Define some fcns & vars as static...

svn path=/trunk/; revision=34459
This commit is contained in:
Bill Meier 2010-10-10 20:14:34 +00:00
parent 209109c2fd
commit acccf6a77c
3 changed files with 14 additions and 14 deletions

View File

@ -30,12 +30,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* XXX:
/* XXX:
ToDo: Find and fix possible memory leak(s):
Example:
A 40M capture file with mostly NCP frames results
A 40M capture file with mostly NCP frames results
in a 400K-800K memory usage increase each time the file is reloaded.
(If the NCP dissection is disabled, there is minimal memory usage
@ -115,8 +115,8 @@ gint ett_nds_segment = -1;
static gint ett_ncp_system_flags = -1;
static struct novell_tap ncp_tap;
struct ncp_common_header header;
struct ncp_common_header *ncp_hdr;
static struct ncp_common_header header;
static struct ncp_common_header *ncp_hdr;
/* Tables for reassembly of fragments. */
GHashTable *nds_fragment_table = NULL;

View File

@ -62,10 +62,10 @@ typedef struct {
guint8 sequence;
} frag_info;
frag_info frags[100];
char mv_resolve_name_string[128];
static frag_info frags[100];
static char mv_resolve_name_string[128];
const fragment_items nds_frag_items = {
static const fragment_items nds_frag_items = {
&ett_nds_segment,
&ett_nds_segments,
&hf_nds_segments,
@ -6758,7 +6758,7 @@ dissect_ncp_89_6_request(tvbuff_t *tvb, proto_tree *volatile ncp_tree, guint32 o
}
void
static void
dissect_ncp_123_11_reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree, ncp_req_hash_value *request_value)
{
int string_len, loffset;
@ -6779,7 +6779,7 @@ dissect_ncp_123_11_reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree, ncp_req_h
proto_tree_add_item(ncp_tree, hf_ncp_copyright, tvb, loffset+1, string_len, TRUE);
}
void
static void
dissect_ncp_123_17_reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree)
{
proto_tree *atree;
@ -6835,7 +6835,7 @@ dissect_ncp_123_17_reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree)
}
}
void
static void
dissect_ncp_23_26_reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree)
{
/* For an IP-only server, the 4-byte IP address is placed into the 4-byte NetworkAddress
@ -6855,7 +6855,7 @@ dissect_ncp_23_26_reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree)
proto_tree_add_item(ncp_tree, hf_ncp_connection_type, tvb, 20, 1, TRUE);
}
void
static void
dissect_ncp_8x20reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree,
const ncp_record *ncp_rec, ncp_req_hash_value *request_value)
{
@ -7191,7 +7191,7 @@ dissect_ncp_8x20reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree,
}
}
void
static void
dissect_ncp_123_62_reply(tvbuff_t *tvb, proto_tree *volatile ncp_tree)
{
char value_format[2]="\0";

View File

@ -5756,10 +5756,10 @@ static int ptvc_struct_int_storage;
if global_highest_var > -1:
print "#define NUM_REPEAT_VARS\t%d" % (global_highest_var + 1)
print "guint repeat_vars[NUM_REPEAT_VARS];",
print "static guint repeat_vars[NUM_REPEAT_VARS];",
else:
print "#define NUM_REPEAT_VARS\t0"
print "guint *repeat_vars = NULL;",
print "static guint *repeat_vars = NULL;",
print """
#define NO_VAR NUM_REPEAT_VARS