Fix Coverity ID 1300: UNUSED_VALUE in dissect_spotlight: "returned_pointer
authorsfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 19 Oct 2011 16:08:13 +0000 (16:08 +0000)
committersfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 19 Oct 2011 16:08:13 +0000 (16:08 +0000)
is never used" because of the return -1 at the end of this if block.
Removed item_toc = assignment and fixed indentation.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39469 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-afp.c

index a3ae998d442847851b6fbc3c2e1b6fdddfdf9cc2..b813f8715ee6e85c2810401e22948b8c164dda68 100644 (file)
@@ -4336,12 +4336,12 @@ dissect_spotlight(tvbuff_t *tvb, proto_tree *tree, gint offset)
        /* ToC */
        offset += (gint)toc_offset;
        if (toc_entries < 1) {
-               item_toc = proto_tree_add_text(tree,
-                                              tvb,
-                                              offset,
-                                              (gint)querylen - (gint)toc_offset,
-                                              "Complex types ToC (%u < 1 - bogus)",
-                                              toc_entries);
+               proto_tree_add_text(tree,
+                                   tvb,
+                                   offset,
+                                   (gint)querylen - (gint)toc_offset,
+                                   "Complex types ToC (%u < 1 - bogus)",
+                                   toc_entries);
                return -1;
        }
        toc_entries -= 1;