aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mpls.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2012-03-02 11:05:50 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2012-03-02 11:05:50 +0000
commitaf2910972ab022343751ef1fa60a9a454c2b9af7 (patch)
treeb84476eed4b42f761afed92c0a0d710afebb11f5 /epan/dissectors/packet-mpls.c
parenteebaffcc5c9a77166402dee3d8a30283ab74f1f0 (diff)
Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41307
Diffstat (limited to 'epan/dissectors/packet-mpls.c')
-rw-r--r--epan/dissectors/packet-mpls.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c
index 4d93273b16..b4aa0c66fd 100644
--- a/epan/dissectors/packet-mpls.c
+++ b/epan/dissectors/packet-mpls.c
@@ -588,7 +588,7 @@ dissect_pw_mcw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector( dissector_data, next_tvb, pinfo, tree );
}
-static void
+static int
dissect_mpls_oam_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *mpls_tree,
int offset, guint8 exp, guint8 bos, guint8 ttl)
{
@@ -613,24 +613,24 @@ dissect_mpls_oam_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_
(functype == 0x07) ? "FDD" : "reserved/unknown");
}
}
- return;
+ return 0;
}
/* sanity checks */
if (!mpls_tree)
- return;
+ return 0;
if (!tvb_bytes_exist(tvb, offset, 44)) {
/* ITU-T Y.1711, 5.3: OAM pdus must have a minimum payload length of 44 bytes */
proto_tree_add_text(mpls_tree, tvb, offset, -1, "Error: must have a minimum payload length of 44 bytes");
- return;
+ return 0;
}
ti = proto_tree_add_text(mpls_tree, tvb, offset, 44, "MPLS Operation & Maintenance");
mpls_oam_tree = proto_item_add_subtree(ti, ett_mpls_oam);
if (!mpls_oam_tree)
- return;
+ return 0;
/* checks for exp, bos and ttl encoding */
@@ -788,12 +788,14 @@ dissect_mpls_oam_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_
default:
proto_tree_add_text(mpls_oam_tree, tvb, offset - 1, -1, "Unknown MPLS OAM pdu");
- return;
+ return 0;
}
/* BIP16 */
proto_tree_add_item(mpls_oam_tree, hf_mpls_oam_bip16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset+=2;
+
+ return offset;
}
static void