aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isis-clv.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-05-18 16:52:45 +0000
committerBill Meier <wmeier@newsguy.com>2011-05-18 16:52:45 +0000
commit5a243ce86ffe3c2c705a8e96c5dcacb74e812bf5 (patch)
treea0835b7d45af7c7749394330d624db4794a13c3f /epan/dissectors/packet-isis-clv.c
parent6725cd673cc9d573d34e231adb75bb9658676d2a (diff)
Don't assign to an unused 'proto_item *': Coverity 939 [UNUSED];
Don't create a subtree which is never used: Coverity 940 [UNUSED]. svn path=/trunk/; revision=37243
Diffstat (limited to 'epan/dissectors/packet-isis-clv.c')
-rw-r--r--epan/dissectors/packet-isis-clv.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/epan/dissectors/packet-isis-clv.c b/epan/dissectors/packet-isis-clv.c
index 093b55ae94..61a6e2d708 100644
--- a/epan/dissectors/packet-isis-clv.c
+++ b/epan/dissectors/packet-isis-clv.c
@@ -74,7 +74,7 @@ isis_dissect_area_address_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
if ( tree ) {
proto_item *ti;
-
+
/*
* Throw an exception rather than putting in a
* partial address.
@@ -172,7 +172,7 @@ isis_dissect_authentication_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
}
break;
default:
- ti = proto_tree_add_text ( tree, tvb, offset - 1, length + 1,
+ proto_tree_add_text ( tree, tvb, offset - 1, length + 1,
"type 0x%02x (0x%02x): ", pw_type, length );
auth_unsupported=TRUE;
break;
@@ -553,6 +553,7 @@ isis_dissect_clvs(tvbuff_t *tvb, proto_tree *tree, int offset,
opts[q].dissect(tvb, clv_tree, offset,
id_length, length);
} else {
+#if 0 /* XXX: Left as commented out in case info about "unknown code" is ever to be displayed under a sub-tree */
if (tree) {
ti = proto_tree_add_text(tree, tvb, offset - 2,
length + 2, "Unknown code %u (%u)",
@@ -562,6 +563,13 @@ isis_dissect_clvs(tvbuff_t *tvb, proto_tree *tree, int offset,
} else {
clv_tree = NULL;
}
+#else
+ if (tree) {
+ ti = proto_tree_add_text(tree, tvb, offset - 2,
+ length + 2, "Unknown code %u (%u)",
+ code, length);
+ }
+#endif
}
offset += length;
}