diff options
author | Balint Reczey <balint@balintreczey.hu> | 2016-10-18 22:41:55 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-10-19 04:02:06 +0000 |
commit | bf96599f1916667cc8f1c19b58fe9cae4a1e3d66 (patch) | |
tree | d2106bfdf9eecd4f4470f15426efe0c3c05e26ee /plugins/gryphon/packet-gryphon.c | |
parent | 739bdfb45f6e6f78a88e978de1eff088377e8330 (diff) | |
download | wireshark-bf96599f1916667cc8f1c19b58fe9cae4a1e3d66.tar.gz wireshark-bf96599f1916667cc8f1c19b58fe9cae4a1e3d66.tar.bz2 wireshark-bf96599f1916667cc8f1c19b58fe9cae4a1e3d66.zip |
Drop redundant SIZEOF() macro
Change-Id: I6db2033746f5f22dd0229c96727bb352bdb1e866
Reviewed-on: https://code.wireshark.org/review/18298
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Petri-Dish: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins/gryphon/packet-gryphon.c')
-rw-r--r-- | plugins/gryphon/packet-gryphon.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c index b9a4e21ee6..9308771a58 100644 --- a/plugins/gryphon/packet-gryphon.c +++ b/plugins/gryphon/packet-gryphon.c @@ -917,19 +917,19 @@ decode_command(tvbuff_t *tvb, int offset, int dst, proto_tree *pt) if (cmd > 0x3F) cmd += dst * 256; - for (i = 0; i < SIZEOF(cmds); i++) { + for (i = 0; i < array_length(cmds); i++) { if (cmds[i].value == cmd) break; } - if (i >= SIZEOF(cmds) && dst >= SD_KNOWN) { + if (i >= array_length(cmds) && dst >= SD_KNOWN) { cmd = (cmd & 0xFF) + SD_CARD * 256; - for (i = 0; i < SIZEOF(cmds); i++) { + for (i = 0; i < array_length(cmds); i++) { if (cmds[i].value == cmd) break; } } - if (i >= SIZEOF(cmds)) - i = SIZEOF(cmds) - 1; + if (i >= array_length(cmds)) + i = array_length(cmds) - 1; proto_tree_add_string(pt, hf_gryphon_command, tvb, offset, 4, cmds[i].strptr); offset += 4; @@ -955,19 +955,19 @@ decode_response(tvbuff_t *tvb, int offset, int src, proto_tree *pt) if (cmd > 0x3F) cmd += src * 256; - for (i = 0; i < SIZEOF(cmds); i++) { + for (i = 0; i < array_length(cmds); i++) { if (cmds[i].value == cmd) break; } - if (i >= SIZEOF(cmds) && src >= SD_KNOWN) { + if (i >= array_length(cmds) && src >= SD_KNOWN) { cmd = (cmd & 0xFF) + SD_CARD * 256; - for (i = 0; i < SIZEOF(cmds); i++) { + for (i = 0; i < array_length(cmds); i++) { if (cmds[i].value == cmd) break; } } - if (i >= SIZEOF(cmds)) - i = SIZEOF(cmds) - 1; + if (i >= array_length(cmds)) + i = array_length(cmds) - 1; proto_tree_add_string(pt, hf_gryphon_command, tvb, offset, 4, cmds[i].strptr); offset += 4; msglen -= 4; |