If that should truly "never happen", use DISSECTOR_ASSERT_NOT_REACHED()
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 19 Apr 2010 23:38:55 +0000 (23:38 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 19 Apr 2010 23:38:55 +0000 (23:38 +0000)
so it's more clearly marked as a dissector bug.

(It apparently *does* happen - see bug 4698.)

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

epan/dissectors/packet-rsvp.c

index df0723c381dfec4597b2cc60753dc2d1ce681424..e2c837ef267feeb1e3e7950b275a2d90b91df073 100644 (file)
@@ -5874,9 +5874,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        break;
     default:
        /* This should never happen. */
-        if (tree) {
-            proto_tree_add_text(tree, tvb, 0, 0, "Unknown session type");
-        }
+       DISSECTOR_ASSERT_NOT_REACHED();
        break;
     }