diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-02-28 02:48:16 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-02-28 02:48:16 +0000 |
commit | e91a73e2c072036183bd09a9d4e96128f4a1bdb5 (patch) | |
tree | 70c37d90f0b940ed6219274d889dae959c54511b /epan | |
parent | 97cc60f8fa781a03e3070785f4e0c9bdf19a48dd (diff) |
Fix Coverity CID 280377: Dead default in switch.
svn path=/trunk/; revision=47931
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ldp.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/epan/dissectors/packet-ldp.c b/epan/dissectors/packet-ldp.c index 72d283d184..d49166db7c 100644 --- a/epan/dissectors/packet-ldp.c +++ b/epan/dissectors/packet-ldp.c @@ -1549,7 +1549,7 @@ dissect_tlv_common_hello_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset, if ( gtsm_flag_buffer & 0x8000 ) { expert_add_info_format(pinfo, gtsm_flag_item, PI_PROTOCOL, PI_WARN,"ERROR - Both GTSM and Target Flag are enabled."); } else { - expert_add_info_format(pinfo, gtsm_flag_item, PI_PROTOCOL, PI_CHAT,"GTSM is supported by the source"); + expert_add_info_format(pinfo, gtsm_flag_item, PI_PROTOCOL, PI_CHAT,"GTSM is supported by the source"); } } else { if ( gtsm_flag_buffer & 0x8000 ) { @@ -2625,19 +2625,9 @@ dissect_msg(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(msg_tree, hf_ldp_msg_len, tvb, offset+2, 2, ENC_BIG_ENDIAN); proto_tree_add_item(msg_tree, hf_ldp_msg_id, tvb, offset+4, 4, ENC_BIG_ENDIAN); if(extra){ - int hf_tmp; - - switch(type){ - case LDP_VENDOR_PRIVATE_START: - hf_tmp=hf_ldp_msg_vendor_id; - break; - case LDP_EXPERIMENTAL_MESSAGE_START: - hf_tmp=hf_ldp_msg_experiment_id; - break; - default: - hf_tmp = 0; - } - proto_tree_add_item(msg_tree, hf_tmp, tvb, offset+8, extra, ENC_BIG_ENDIAN); + proto_tree_add_item(msg_tree, (type == LDP_VENDOR_PRIVATE_START) ? + hf_ldp_msg_vendor_id : hf_ldp_msg_experiment_id, tvb, offset+8, + extra, ENC_BIG_ENDIAN); } } |