aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ieee80211.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-03-15 05:39:04 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-03-15 05:39:04 +0000
commitcb9c7d771306d4bf247b84116af3645d9e567f30 (patch)
tree421a7ed5467be225c4b8c87e78dee474bee9e4a0 /packet-ieee80211.c
parentc3d4b76f3576cb73fdb23fc3921948c5a3375c08 (diff)
Don't attempt to modify the data pointed to by the result of
"tvb_get_ptr()". Display a "(B)" flag for supported rates that are in the BSSBasicRate Set. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3129 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ieee80211.c')
-rw-r--r--packet-ieee80211.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/packet-ieee80211.c b/packet-ieee80211.c
index af59e22f0e..076ccd1331 100644
--- a/packet-ieee80211.c
+++ b/packet-ieee80211.c
@@ -3,7 +3,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
- * $Id: packet-ieee80211.c,v 1.14 2001/03/13 21:34:23 gram Exp $
+ * $Id: packet-ieee80211.c,v 1.15 2001/03/15 05:39:04 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -594,18 +594,9 @@ add_tagged_field (proto_tree * tree, tvbuff_t * tvb, int offset)
for (i = 0; i < tag_len; i++)
{
-
- if (tag_data_ptr[i] >= 128)
- {
- tag_data_ptr[i] -= 128;
- n += snprintf (out_buff + n, SHORT_STR - n, "%2.1f ", (float)
- (((float) tag_data_ptr[i]) * 0.5));
- }
-
- else
- n += snprintf (out_buff + n, SHORT_STR - n, "%2.1f ", (float)
- (((float) tag_data_ptr[i]) * 0.5));
-
+ n += snprintf (out_buff + n, SHORT_STR - n, "%2.1f%s ",
+ (tag_data_ptr[i] & 0x7F) * 0.5,
+ (tag_data_ptr[i] & 0x80) ? "(B)" : "");
}
snprintf (out_buff + n, SHORT_STR - n, "[Mbit/sec]");