aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-zdp.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-05-22 18:12:41 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-05-23 17:02:02 +0000
commitfa2ca46f288ca7b43cd1cb2d006d266df2f8c70e (patch)
treea2e460146bdfb39a4e7b606dacc5c89a075e7911 /epan/dissectors/packet-zbee-zdp.c
parent39c8e7e3136d4afc8f09ed745e7ca32ee7f3861c (diff)
zigbee zdp: There are 32 bits in a guint32.
No need for obtuse math and lots of casting. Change-Id: I41bf7dd98700b1b58eae93d36bb55e2e7017b506 Reviewed-on: https://code.wireshark.org/review/15532 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-zbee-zdp.c')
-rw-r--r--epan/dissectors/packet-zbee-zdp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c
index aee5d2b325..7852613372 100644
--- a/epan/dissectors/packet-zbee-zdp.c
+++ b/epan/dissectors/packet-zbee-zdp.c
@@ -590,14 +590,14 @@ zdp_parse_chanmask(proto_tree *tree, tvbuff_t *tvb, guint *offset, int hf_channe
proto_item_append_text(ti, "None");
}
/* Display the first channel #. */
- for (i=0; i<(8*(int)(int)sizeof(guint32)); i++) {
+ for (i=0; i<32; i++) {
if ((1<<i) & mask) {
proto_item_append_text(ti, "%d", i++);
break;
}
} /* for */
/* Display the rest of the channels. */
- for (;i<(8*(int)(int)sizeof(guint32)); i++) {
+ for (;i<32; i++) {
if (!((1<<i) & mask)) {
/* This channel isn't selected. */
continue;