aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sml.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-02-19 04:48:34 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-02-19 04:48:34 +0000
commit2a02a5d367e87e17e24d7ea081799851805c18cc (patch)
tree4328bb21f7bd13cad6d3998f23d35e4cc3c3c446 /epan/dissectors/packet-sml.c
parentc037516c5ec6df18e3b219047ba96302b058b590 (diff)
According to wikipedia, the A6M was outdated by 1944. Let it rest in peace.
svn path=/trunk/; revision=47744
Diffstat (limited to 'epan/dissectors/packet-sml.c')
-rw-r--r--epan/dissectors/packet-sml.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/epan/dissectors/packet-sml.c b/epan/dissectors/packet-sml.c
index f2b7d38c5b..7e99cbe516 100644
--- a/epan/dissectors/packet-sml.c
+++ b/epan/dissectors/packet-sml.c
@@ -73,8 +73,7 @@ Short description of the SML protocol on the SML Wireshark Wiki page: http://wi
#define UNSIGNED16 0x63
#define LIST_6_ELEMENTS 0x76
-#define ZERO 0x00
-#define MSB 0x80
+#define MSB 0x80
static guint tcp_port_pref = TCP_PORT_SML;
static guint udp_port_pref = UDP_PORT_SML;
@@ -395,7 +394,7 @@ static void sml_value(tvbuff_t *tvb,proto_tree *insert_tree,guint *offset, guint
if (tvb_get_guint8(tvb, *offset) != OPTIONAL){
value_tree = proto_item_add_subtree (value, ett_sml_value);
- if ((tvb_get_guint8(tvb, *offset) & 0x80) == MSB || (tvb_get_guint8(tvb, *offset) & 0xF0) == ZERO){
+ if ((tvb_get_guint8(tvb, *offset) & 0x80) == MSB || (tvb_get_guint8(tvb, *offset) & 0xF0) == 0){
proto_tree_add_text (value_tree, tvb, *offset, *length, "Length: %d %s", *data, plurality(*data, "octet", "octets"));
*offset+= *length;
}
@@ -2259,7 +2258,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr
}
if (tvb_get_ntoh40(tvb, end_offset-8) != ESC_SEQ_END && pinfo->can_desegment){
- if (tvb_get_guint8(tvb, end_offset-1) != ZERO){
+ if (tvb_get_guint8(tvb, end_offset-1) != 0){
pinfo->desegment_offset = start_offset;
pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
return;
@@ -2490,7 +2489,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr
}
/*Message END*/
- if (tvb_get_guint8 (tvb, *offset) == ZERO){
+ if (tvb_get_guint8 (tvb, *offset) == 0){
proto_tree_add_item (mainlist_list, hf_sml_endOfSmlMsg, tvb, *offset, 1, ENC_BIG_ENDIAN);
*offset+=1;
}
@@ -2507,7 +2506,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr
if (check == LIST_6_ELEMENTS){
close1 = FALSE;
}
- else if (check == 0x1b || check == ZERO){
+ else if (check == 0x1b || check == 0){
close1 = TRUE;
}
}
@@ -2521,11 +2520,11 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr
}
/*Padding*/
- if (check == ZERO){
+ if (check == 0){
length = 1;
*offset+=1;
- while (tvb_get_guint8(tvb, *offset) == ZERO){
+ while (tvb_get_guint8(tvb, *offset) == 0){
length++;
*offset+=1;
}