diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-05-20 15:19:26 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-05-20 15:19:26 +0000 |
commit | 57b17b87944a1f18f7b89498b15d2d1029b733a8 (patch) | |
tree | 7051b6003228b1eb769e2e246b5f51b8c901f5f9 | |
parent | d2989164bddc0d30c2b6d80c7e268af1a84242c8 (diff) |
'#if 0' code related to already commented out code: Fixes Coverity 881.
svn path=/trunk/; revision=37328
-rw-r--r-- | epan/dissectors/packet-dis-fields.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/epan/dissectors/packet-dis-fields.c b/epan/dissectors/packet-dis-fields.c index 441cbf642b..50deaaa3a0 100644 --- a/epan/dissectors/packet-dis-fields.c +++ b/epan/dissectors/packet-dis-fields.c @@ -644,7 +644,9 @@ gint parseField_Enum(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNod const value_string *enumStrings = 0; guint32 enumVal = 0; const gchar *enumStr = 0; - proto_item *pi = NULL; +#if 0 + proto_item *pi; +#endif int dis_hf_id = -1; offset = alignOffset(offset, numBytes); @@ -819,13 +821,16 @@ gint parseField_Enum(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNod enumStr = val_to_str(enumVal, enumStrings, "Unknown Enumeration (%d)"); - if (dis_hf_id != -1) { - pi = proto_tree_add_item(tree, dis_hf_id, tvb, offset, numBytes, FALSE); -/* proto_item_set_text(pi, "%s = %s", parserNode.fieldLabel, enumStr); */ - } - else + if (dis_hf_id == -1) { proto_tree_add_text(tree, tvb, offset, numBytes, "%s = %s", parserNode.fieldLabel, enumStr); + } +#if 0 + else { + pi = proto_tree_add_item(tree, dis_hf_id, tvb, offset, numBytes, FALSE); + proto_item_set_text(pi, "%s = %s", parserNode.fieldLabel, enumStr); + } +#endif if (parserNode.outputVar != 0) { |