diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-02-19 04:48:34 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-02-19 04:48:34 +0000 |
commit | 2a02a5d367e87e17e24d7ea081799851805c18cc (patch) | |
tree | 4328bb21f7bd13cad6d3998f23d35e4cc3c3c446 | |
parent | c037516c5ec6df18e3b219047ba96302b058b590 (diff) |
According to wikipedia, the A6M was outdated by 1944. Let it rest in peace.
svn path=/trunk/; revision=47744
-rw-r--r-- | epan/dissectors/packet-sml.c | 15 | ||||
-rw-r--r-- | epan/dissectors/packet-vj.c | 19 |
2 files changed, 15 insertions, 19 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; } diff --git a/epan/dissectors/packet-vj.c b/epan/dissectors/packet-vj.c index 188822654d..91776e15e5 100644 --- a/epan/dissectors/packet-vj.c +++ b/epan/dissectors/packet-vj.c @@ -106,9 +106,6 @@ #define VJ_OK 0 #define VJ_ERROR -1 -/* Define for 0 */ -#define ZERO 0 - /* VJ Mem Chunk defines */ #define VJ_DATA_SIZE 128 /* Max IP hdr(64)+Max TCP hdr(64) */ @@ -305,7 +302,7 @@ dissect_vjuc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * tree) buffer[IP_FIELD_PROTOCOL] = IP_PROTO_TCP; /* Check IP checksum */ - if(ip_csum(buffer, ihl) != ZERO) { + if(ip_csum(buffer, ihl) != 0) { /* * Checksum invalid - don't update state, and don't decompress * any subsequent compressed packets in this direction. @@ -436,7 +433,7 @@ dissect_vjc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void vj_init(void) { - gint i = ZERO; + gint i = 0; for(i = 0; i < RX_TX_STATE_COUNT; i++) { rx_tx_state[i] = slhc_init(); @@ -516,7 +513,7 @@ static gint vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree, slcompress *comp) { - int offset = ZERO; + int offset = 0; int i; gint changes; proto_item *ti; @@ -526,7 +523,7 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree, iphdr_type *ip = NULL; tcphdr_type *thp = NULL; guint16 tcp_cksum; - gint hdrlen = ZERO; + gint hdrlen = 0; guint16 word; int delta; gint len; @@ -699,7 +696,7 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree, /* Compute IP packet length and the buffer length needed */ len = tvb_reported_length_remaining(src_tvb, offset); - if(len < ZERO) { + if(len < 0) { /* * This shouldn't happen, as we *were* able to fetch stuff right before * offset. @@ -725,7 +722,7 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree, len += hdrlen; ip->tot_len = g_htons(len); /* Compute IP check sum */ - ip->cksum = ZERO; + ip->cksum = 0; ip->cksum = ip_csum((guint8 *)ip, lo_nibble(ip->ihl_version) * 4); /* Store the reconstructed header in frame data area */ @@ -761,7 +758,7 @@ get_unsigned_delta(tvbuff_t *tvb, int *offsetp, int hf, proto_tree *tree) len = 1; del = tvb_get_guint8(tvb, offset++); - if(del == ZERO){ + if(del == 0){ del = tvb_get_ntohs(tvb, offset); offset += 2; len += 2; @@ -785,7 +782,7 @@ get_signed_delta(tvbuff_t *tvb, int *offsetp, int hf, proto_tree *tree) len = 1; del = tvb_get_guint8(tvb, offset++); - if(del == ZERO){ + if(del == 0){ del = tvb_get_ntohs(tvb, offset); offset += 2; len += 2; |