diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-10-24 22:22:38 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-10-25 11:21:10 +0000 |
commit | cc77d6c66f0c0c32bda005bacbac686a158b95d0 (patch) | |
tree | 5a7af53e759f20f21012c66a538ea01c8cfc9b56 | |
parent | 93c647ee4c6d5d88b8cf259570de4434632c44fd (diff) | |
download | wireshark-cc77d6c66f0c0c32bda005bacbac686a158b95d0.tar.gz wireshark-cc77d6c66f0c0c32bda005bacbac686a158b95d0.tar.bz2 wireshark-cc77d6c66f0c0c32bda005bacbac686a158b95d0.zip |
There's no need for all these variables to be volatile.
I suppose there must have been TRYs and CATCHes in here years ago. And/or
there was just too much cutting-and-pasting going on here.
Also reindent some col_ calls: they weren't moved left when check_col() was
taken out.
Change-Id: I0b01e008395be5b638a0470645d247dc706ca93f
Reviewed-on: https://code.wireshark.org/review/11254
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-ieee8021ah.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/epan/dissectors/packet-ieee8021ah.c b/epan/dissectors/packet-ieee8021ah.c index a10a96827b..afadb086b3 100644 --- a/epan/dissectors/packet-ieee8021ah.c +++ b/epan/dissectors/packet-ieee8021ah.c @@ -112,9 +112,9 @@ dissect_ieee8021ad(tvbuff_t *tvb, packet_info *pinfo, int proto_tree_index; ethertype_data_t ethertype_data; - tvbuff_t *volatile next_tvb = NULL; - proto_tree *volatile ieee8021ad_tree; - proto_tree *volatile ieee8021ad_tag_tree; + tvbuff_t *next_tvb = NULL; + proto_tree *ieee8021ad_tree; + proto_tree *ieee8021ad_tag_tree; /* set tree index */ proto_tree_index = proto_ieee8021ad; @@ -125,9 +125,9 @@ dissect_ieee8021ad(tvbuff_t *tvb, packet_info *pinfo, tci = tvb_get_ntohs( tvb, 0 ); - col_add_fstr(pinfo->cinfo, COL_INFO, - "PRI: %d DROP: %d ID: %d", - (tci >> 13), ((tci >> 12) & 1), (tci & 0xFFF)); + col_add_fstr(pinfo->cinfo, COL_INFO, + "PRI: %d DROP: %d ID: %d", + (tci >> 13), ((tci >> 12) & 1), (tci & 0xFFF)); /* create the protocol tree */ ieee8021ad_tree = NULL; @@ -230,14 +230,14 @@ dissect_ieee8021ah_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree; ethertype_data_t ethertype_data; - proto_tree *volatile ieee8021ah_tag_tree; + proto_tree *ieee8021ah_tag_tree; tci = tvb_get_ntohl( tvb, 0 ); - col_add_fstr(pinfo->cinfo, COL_INFO, - "PRI: %d Drop: %d NCA: %d Res1: %d Res2: %d I-SID: %d", - (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1), - ((tci >> 26) & 1), ((tci >> 24) & 3), tci & IEEE8021AH_ISIDMASK); + col_add_fstr(pinfo->cinfo, COL_INFO, + "PRI: %d Drop: %d NCA: %d Res1: %d Res2: %d I-SID: %d", + (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1), + ((tci >> 26) & 1), ((tci >> 24) & 3), tci & IEEE8021AH_ISIDMASK); /* create the protocol tree */ ptree = NULL; @@ -302,7 +302,7 @@ dissect_ieee8021ah(tvbuff_t *tvb, packet_info *pinfo, proto_item *pi; guint32 tci; int proto_tree_index; - proto_tree *volatile ieee8021ah_tree; + proto_tree *ieee8021ah_tree; /* set tree index */ proto_tree_index = proto_ieee8021ah; @@ -313,10 +313,10 @@ dissect_ieee8021ah(tvbuff_t *tvb, packet_info *pinfo, tci = tvb_get_ntohl( tvb, 0 ); - col_add_fstr(pinfo->cinfo, COL_INFO, - "PRI: %d Drop: %d NCA: %d Res1: %d Res2: %d I-SID: %d", - (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1), - ((tci >> 26) & 1), ((tci >> 24) & 3), (tci & 0x00FFFFFF)); + col_add_fstr(pinfo->cinfo, COL_INFO, + "PRI: %d Drop: %d NCA: %d Res1: %d Res2: %d I-SID: %d", + (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1), + ((tci >> 26) & 1), ((tci >> 24) & 3), (tci & 0x00FFFFFF)); pi = proto_tree_add_item(tree, proto_tree_index, tvb, 0, IEEE8021AH_LEN, ENC_NA); ieee8021ah_tree = proto_item_add_subtree(pi, ett_ieee8021ah); |