aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pim.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-11-08 11:14:27 +0100
committerEvan Huus <eapache@gmail.com>2014-11-08 20:53:20 +0000
commitdea982b6ebe3961b78c7e3eb6e4b988bed0106cb (patch)
tree87ac0376581f6aa8f00714842863b29b7df1d536 /epan/dissectors/packet-pim.c
parentae61a41e578692db7e89bae2f3f1a90918c2e62d (diff)
PIM: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I4bfc67705ee824e68f14e4177a3194d66bbbe165 Reviewed-on: https://code.wireshark.org/review/5188 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-pim.c')
-rw-r--r--epan/dissectors/packet-pim.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c
index b563fa2cf9..02dca011ad 100644
--- a/epan/dissectors/packet-pim.c
+++ b/epan/dissectors/packet-pim.c
@@ -741,7 +741,7 @@ static void
dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
int offset = 0;
guint8 pim_typever;
- guint8 pim_bidir_subtype;
+ guint8 pim_bidir_subtype = 0;
guint length, pim_length;
guint16 pim_cksum, computed_cksum;
vec_t cksum_vec[4];
@@ -1306,7 +1306,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
offset += 4;
proto_tree_add_item(pimopt_tree, hf_pim_metric, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- break;
+
switch(PIM_BIDIR_SUBTYPE(pim_bidir_subtype)) {
case PIM_BDIR_DF_BACKOFF :
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast,
@@ -1319,7 +1319,6 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_item(pimopt_tree, hf_pim_bd_offer_metric, tvb, offset, 4, ENC_NA);
offset += 4;
proto_tree_add_item(pimopt_tree, hf_pim_bd_offer_interval, tvb, offset, 2, ENC_NA);
- offset += 2;
break;
case PIM_BDIR_DF_PASS:
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast,
@@ -1330,7 +1329,6 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_item(pimopt_tree, hf_pim_bd_pass_metric_pref, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(pimopt_tree, hf_pim_bd_pass_metric, tvb, offset, 4, ENC_NA);
- offset += 4;
break;
}
}