aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-09-15 17:37:54 +0000
committerBill Meier <wmeier@newsguy.com>2009-09-15 17:37:54 +0000
commit6c545e0d798571d82230c9a652f7fea2d0f23365 (patch)
tree83eba9280f86acfc8cdaf8b62ea258b15673ed5e
parent9467ccee2c25d445a6d9a596ce3b77db65e63ffe (diff)
Save some memory: Don't statically allocate ett[] arrays used "dynamically".
svn path=/trunk/; revision=29929
-rw-r--r--epan/dissectors/packet-ansi_637.c2
-rw-r--r--epan/dissectors/packet-cimd.c2
-rw-r--r--epan/dissectors/packet-gsm_a_bssmap.c4
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c8
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c6
-rw-r--r--epan/dissectors/packet-gsm_a_rp.c8
-rw-r--r--epan/dissectors/packet-gsm_a_rr.c10
-rw-r--r--epan/dissectors/packet-gsm_bsslap.c4
-rw-r--r--epan/dissectors/packet-gsm_bssmap_le.c4
-rw-r--r--epan/dissectors/packet-gsm_sms.c2
-rw-r--r--epan/dissectors/packet-nas_eps.c8
-rw-r--r--epan/dissectors/packet-olsr.c2
-rw-r--r--epan/dissectors/packet-rsvp.c3
-rw-r--r--epan/dissectors/packet-zbee-zcl.c2
14 files changed, 33 insertions, 32 deletions
diff --git a/epan/dissectors/packet-ansi_637.c b/epan/dissectors/packet-ansi_637.c
index 76d8c96e12..31a3d84b78 100644
--- a/epan/dissectors/packet-ansi_637.c
+++ b/epan/dissectors/packet-ansi_637.c
@@ -2326,7 +2326,7 @@ proto_register_ansi_637(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_PARAMS 3
- static gint *ett[NUM_INDIVIDUAL_PARAMS+NUM_TELE_PARAM+NUM_TRANS_MSG_TYPE+NUM_TRANS_PARAM];
+ gint *ett[NUM_INDIVIDUAL_PARAMS+NUM_TELE_PARAM+NUM_TRANS_MSG_TYPE+NUM_TRANS_PARAM];
memset((void *) ett, 0, sizeof(ett));
diff --git a/epan/dissectors/packet-cimd.c b/epan/dissectors/packet-cimd.c
index 65b4e85a36..9400e82cc2 100644
--- a/epan/dissectors/packet-cimd.c
+++ b/epan/dissectors/packet-cimd.c
@@ -841,7 +841,7 @@ proto_register_cimd(void)
};
/* Setup protocol subtree array */
- static gint *ett[MAXPARAMSCOUNT + 1];
+ gint *ett[MAXPARAMSCOUNT + 1];
int i;
ett[0] = &ett_cimd;
diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c
index f473bfd5a6..26f1d317b1 100644
--- a/epan/dissectors/packet-gsm_a_bssmap.c
+++ b/epan/dissectors/packet-gsm_a_bssmap.c
@@ -6211,8 +6211,8 @@ proto_register_gsm_a_bssmap(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 4
- static gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_MSG +
- NUM_GSM_BSSMAP_ELEM];
+ gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_MSG +
+ NUM_GSM_BSSMAP_ELEM];
ett[0] = &ett_bssmap_msg;
ett[1] = &ett_cell_list;
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index dbdd63321c..1da4db27cb 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -6066,10 +6066,10 @@ proto_register_gsm_a_dtap(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 19
- static gint *ett[NUM_INDIVIDUAL_ELEMS +
- NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_CC +
- NUM_GSM_DTAP_MSG_SMS + NUM_GSM_DTAP_MSG_SS + NUM_GSM_DTAP_MSG_TP +
- NUM_GSM_DTAP_ELEM];
+ gint *ett[NUM_INDIVIDUAL_ELEMS +
+ NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_CC +
+ NUM_GSM_DTAP_MSG_SMS + NUM_GSM_DTAP_MSG_SS + NUM_GSM_DTAP_MSG_TP +
+ NUM_GSM_DTAP_ELEM];
ett[0] = &ett_dtap_msg;
ett[1] = &ett_dtap_oct_1;
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index d1a6d413c1..5dc07b060c 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -6084,9 +6084,9 @@ proto_register_gsm_a_gm(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 15
- static gint *ett[NUM_INDIVIDUAL_ELEMS +
- NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SM +
- NUM_GSM_GM_ELEM];
+ gint *ett[NUM_INDIVIDUAL_ELEMS +
+ NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SM +
+ NUM_GSM_GM_ELEM];
ett[0] = &ett_tc_component;
ett[1] = &ett_tc_invoke_id;
diff --git a/epan/dissectors/packet-gsm_a_rp.c b/epan/dissectors/packet-gsm_a_rp.c
index 208a2beba0..0056fa69f4 100644
--- a/epan/dissectors/packet-gsm_a_rp.c
+++ b/epan/dissectors/packet-gsm_a_rp.c
@@ -557,10 +557,10 @@ proto_register_gsm_a_rp(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 1
- static gint *ett[NUM_INDIVIDUAL_ELEMS +
- NUM_GSM_RP_MSG +
- NUM_GSM_RP_ELEM];
-
+ gint *ett[NUM_INDIVIDUAL_ELEMS +
+ NUM_GSM_RP_MSG +
+ NUM_GSM_RP_ELEM];
+
ett[0] = &ett_rp_msg;
last_offset = NUM_INDIVIDUAL_ELEMS;
diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c
index 10fdf094c4..d708e02bf6 100644
--- a/epan/dissectors/packet-gsm_a_rr.c
+++ b/epan/dissectors/packet-gsm_a_rr.c
@@ -10157,11 +10157,11 @@ proto_register_gsm_a_rr(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 3
- static gint *ett[NUM_INDIVIDUAL_ELEMS +
- NUM_GSM_DTAP_MSG_RR +
- NUM_GSM_RR_ELEM +
- NUM_GSM_RR_REST_OCTETS_ELEM +
- NUM_GSM_SACCH_MSG_RR];
+ gint *ett[NUM_INDIVIDUAL_ELEMS +
+ NUM_GSM_DTAP_MSG_RR +
+ NUM_GSM_RR_ELEM +
+ NUM_GSM_RR_REST_OCTETS_ELEM +
+ NUM_GSM_SACCH_MSG_RR];
ett[0] = &ett_ccch_msg;
ett[1] = &ett_ccch_oct_1;
diff --git a/epan/dissectors/packet-gsm_bsslap.c b/epan/dissectors/packet-gsm_bsslap.c
index 2b1083ef11..aa3179a2f1 100644
--- a/epan/dissectors/packet-gsm_bsslap.c
+++ b/epan/dissectors/packet-gsm_bsslap.c
@@ -932,8 +932,8 @@ proto_register_gsm_bsslap(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 2
- static gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSLAP_MSG +
- NUM_GSM_BSSLAP_ELEM];
+ gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSLAP_MSG +
+ NUM_GSM_BSSLAP_ELEM];
ett[0] = &ett_gsm_bsslap;
ett[1] = &ett_bsslap_cell_list;
diff --git a/epan/dissectors/packet-gsm_bssmap_le.c b/epan/dissectors/packet-gsm_bssmap_le.c
index ee0ab37d73..f100c4c86b 100644
--- a/epan/dissectors/packet-gsm_bssmap_le.c
+++ b/epan/dissectors/packet-gsm_bssmap_le.c
@@ -1068,8 +1068,8 @@ proto_register_gsm_bssmap_le(void)
};
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 1
- static gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_LE_MSG +
- NUM_GSM_BSSMAP_LE_ELEM];
+ gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_LE_MSG +
+ NUM_GSM_BSSMAP_LE_ELEM];
ett[0] = &ett_bssmap_le_msg;
diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c
index ce152a66b5..9950eb1bf1 100644
--- a/epan/dissectors/packet-gsm_sms.c
+++ b/epan/dissectors/packet-gsm_sms.c
@@ -3660,7 +3660,7 @@ proto_register_gsm_sms(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_PARMS 12
- static gint *ett[NUM_INDIVIDUAL_PARMS+NUM_MSGS+NUM_UDH_IEIS+2];
+ gint *ett[NUM_INDIVIDUAL_PARMS+NUM_MSGS+NUM_UDH_IEIS+2];
ett[0] = &ett_gsm_sms;
ett[1] = &ett_pid;
diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c
index 0a573f76a7..0aa3c60e1a 100644
--- a/epan/dissectors/packet-nas_eps.c
+++ b/epan/dissectors/packet-nas_eps.c
@@ -4593,10 +4593,10 @@ void proto_register_nas_eps(void) {
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 2
- static gint *ett[NUM_INDIVIDUAL_ELEMS +
- NUM_NAS_EPS_COMMON_ELEM +
- NUM_NAS_MSG_EMM + NUM_NAS_EMM_ELEM+
- NUM_NAS_MSG_ESM + NUM_NAS_ESM_ELEM];
+ gint *ett[NUM_INDIVIDUAL_ELEMS +
+ NUM_NAS_EPS_COMMON_ELEM +
+ NUM_NAS_MSG_EMM + NUM_NAS_EMM_ELEM+
+ NUM_NAS_MSG_ESM + NUM_NAS_ESM_ELEM];
ett[0] = &ett_nas_eps;
ett[1] = &ett_nas_eps_esm_msg_cont;
diff --git a/epan/dissectors/packet-olsr.c b/epan/dissectors/packet-olsr.c
index e265884c87..109d3bf97c 100644
--- a/epan/dissectors/packet-olsr.c
+++ b/epan/dissectors/packet-olsr.c
@@ -976,7 +976,7 @@ void proto_register_olsr(void) {
&ett_olsr_message_ns
};
- static gint *ett[array_length(ett_base) + (G_MAXUINT8+1)];
+ gint *ett[array_length(ett_base) + (G_MAXUINT8+1)];
module_t *olsr_module;
int i,j;
diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c
index 570ab5d6cf..5a0a74d72a 100644
--- a/epan/dissectors/packet-rsvp.c
+++ b/epan/dissectors/packet-rsvp.c
@@ -263,7 +263,6 @@ enum {
TT_MAX
};
static gint ett_treelist[TT_MAX];
-static gint *ett_tree[TT_MAX];
#define TREE(X) ett_treelist[(X)]
/* Should we dissect bundle messages? */
@@ -5916,6 +5915,8 @@ proto_register_rsvp(void)
BASE_NONE, NULL, 0x0, NULL, HFILL }}
};
+ gint *ett_tree[TT_MAX];
+
/* Build the tree array */
for (i=0; i<TT_MAX; i++) {
ett_treelist[i] = -1;
diff --git a/epan/dissectors/packet-zbee-zcl.c b/epan/dissectors/packet-zbee-zcl.c
index 9e69d078ab..4ae4e3b342 100644
--- a/epan/dissectors/packet-zbee-zcl.c
+++ b/epan/dissectors/packet-zbee-zcl.c
@@ -2112,7 +2112,7 @@ void proto_register_zbee_zcl(void)
};
/* ZCL subtrees */
- static gint *ett[ZBEE_ZCL_NUM_INDIVIDUAL_ETT + ZBEE_ZCL_NUM_ATTR_ETT];
+ gint *ett[ZBEE_ZCL_NUM_INDIVIDUAL_ETT + ZBEE_ZCL_NUM_ATTR_ETT];
ett[0] = &ett_zbee_zcl;
ett[1] = &ett_zbee_zcl_fcf;