From cc77d6c66f0c0c32bda005bacbac686a158b95d0 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Sat, 24 Oct 2015 22:22:38 -0400 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-ieee8021ah.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'epan/dissectors/packet-ieee8021ah.c') 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); -- cgit v1.2.3