summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-skinny.c.in
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-skinny.c.in')
-rw-r--r--epan/dissectors/packet-skinny.c.in32
1 files changed, 16 insertions, 16 deletions
diff --git a/epan/dissectors/packet-skinny.c.in b/epan/dissectors/packet-skinny.c.in
index 4949748e..a8c8740b 100644
--- a/epan/dissectors/packet-skinny.c.in
+++ b/epan/dissectors/packet-skinny.c.in
@@ -144,38 +144,38 @@ for enum in skinny.enum:
/*[[[end]]]*/
/* Staticly Declared Variables */
-static int proto_skinny = -1;
-static int hf_skinny_messageId = -1;
-static int hf_skinny_data_length = -1;
-static int hf_skinny_hdr_version = -1;
-static int hf_skinny_xmlData = -1;
-static int hf_skinny_ipv4or6 = -1;
-static int hf_skinny_response_in = -1;
-static int hf_skinny_response_to = -1;
-static int hf_skinny_response_time = -1;
+static int proto_skinny;
+static int hf_skinny_messageId;
+static int hf_skinny_data_length;
+static int hf_skinny_hdr_version;
+static int hf_skinny_xmlData;
+static int hf_skinny_ipv4or6;
+static int hf_skinny_response_in;
+static int hf_skinny_response_to;
+static int hf_skinny_response_time;
/* [[[cog
for key in sorted(xml2skinny.fieldsArray.keys()):
- cog.out('static int hf_skinny_%s = -1;\n' %key)
+ cog.out('static int hf_skinny_%s;\n' %key)
]]]*/
/*[[[end]]]*/
static dissector_handle_t xml_handle;
/* Initialize the subtree pointers */
-static int ett_skinny = -1;
-static int ett_skinny_tree = -1;
+static int ett_skinny;
+static int ett_skinny_tree;
/* preference globals */
-static gboolean global_skinny_desegment = true;
+static bool global_skinny_desegment = true;
/* tap register id */
-static int skinny_tap = -1;
+static int skinny_tap;
/* skinny protocol tap info */
#define MAX_SKINNY_MESSAGES_IN_PACKET 10
static skinny_info_t pi_arr[MAX_SKINNY_MESSAGES_IN_PACKET];
-static int pi_current = 0;
+static int pi_current;
static skinny_info_t *si;
dissector_handle_t skinny_handle;
@@ -445,7 +445,7 @@ static int dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
hdr_version = tvb_get_letohl(tvb, 4);
hdr_opcode = tvb_get_letohl(tvb, 8);
- for (i = 0; i < sizeof(skinny_opcode_map)/sizeof(skinny_opcode_map_t) ; i++) {
+ for (i = 0; i < array_length(skinny_opcode_map); i++) {
if (skinny_opcode_map[i].opcode == hdr_opcode) {
opcode_entry = &skinny_opcode_map[i];
}