diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-04-15 11:03:21 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-04-15 11:03:21 +0000 |
commit | 7279a4243170652e77b3314379da930c6ca603ee (patch) | |
tree | 6f460101cb00ec9bb93443c805965814b7a55884 /tap-h225counter.c | |
parent | f59e6b9e1e6ccb4c7f0e53643f5cabea8fed8849 (diff) |
Replace 14 for loops (each setting an array of integers to 0) with a memset
svn path=/trunk/; revision=21441
Diffstat (limited to 'tap-h225counter.c')
-rw-r--r-- | tap-h225counter.c | 47 |
1 files changed, 4 insertions, 43 deletions
diff --git a/tap-h225counter.c b/tap-h225counter.c index 29afbdacec..19495b80fa 100644 --- a/tap-h225counter.c +++ b/tap-h225counter.c @@ -84,50 +84,11 @@ static void h225counter_reset(void *phs) { h225counter_t *hs=(h225counter_t *)phs; - int i; + char *save_filter = hs->filter; - for(i=0;i<=RAS_MSG_TYPES;i++) { - hs->ras_msg[i] = 0; - } - for(i=0;i<=CS_MSG_TYPES;i++) { - hs->cs_msg[i] = 0; - } - for(i=0;i<=GRJ_REASONS;i++) { - hs->grj_reason[i] = 0; - } - for(i=0;i<=RRJ_REASONS;i++) { - hs->rrj_reason[i] = 0; - } - for(i=0;i<=URQ_REASONS;i++) { - hs->urq_reason[i] = 0; - } - for(i=0;i<=URJ_REASONS;i++) { - hs->urj_reason[i] = 0; - } - for(i=0;i<=ARJ_REASONS;i++) { - hs->arj_reason[i] = 0; - } - for(i=0;i<=BRJ_REASONS;i++) { - hs->brj_reason[i] = 0; - } - for(i=0;i<=DRQ_REASONS;i++) { - hs->drq_reason[i] = 0; - } - for(i=0;i<=DRJ_REASONS;i++) { - hs->drj_reason[i] = 0; - } - for(i=0;i<=LRJ_REASONS;i++) { - hs->lrj_reason[i] = 0; - } - for(i=0;i<=IRQNAK_REASONS;i++) { - hs->irqnak_reason[i] = 0; - } - for(i=0;i<=REL_CMP_REASONS;i++) { - hs->rel_cmp_reason[i] = 0; - } - for(i=0;i<=FACILITY_REASONS;i++) { - hs->facility_reason[i] = 0; - } + memset(hs, 0, sizeof(h225counter_t)); + + hs->filter = save_filter; } static int |