summaryrefslogtreecommitdiff
path: root/tap-h225counter.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2007-04-15 11:03:21 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2007-04-15 11:03:21 +0000
commit7279a4243170652e77b3314379da930c6ca603ee (patch)
tree6f460101cb00ec9bb93443c805965814b7a55884 /tap-h225counter.c
parentf59e6b9e1e6ccb4c7f0e53643f5cabea8fed8849 (diff)
downloadwireshark-7279a4243170652e77b3314379da930c6ca603ee.tar.gz
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.c47
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