aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-ncp.c8
-rw-r--r--epan/dissectors/packet-ncp2222.inc16
-rwxr-xr-xtools/ncp2222.py4
3 files changed, 14 insertions, 14 deletions
diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c
index ea77d59648..c85fd927c7 100644
--- a/epan/dissectors/packet-ncp.c
+++ b/epan/dissectors/packet-ncp.c
@@ -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;
diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc
index aaa982a083..93a9ffa0ab 100644
--- a/epan/dissectors/packet-ncp2222.inc
+++ b/epan/dissectors/packet-ncp2222.inc
@@ -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";
diff --git a/tools/ncp2222.py b/tools/ncp2222.py
index 20cc1dbd8d..a377b98523 100755
--- a/tools/ncp2222.py
+++ b/tools/ncp2222.py
@@ -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