diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-06-10 18:28:22 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-06-10 18:28:22 +0000 |
commit | fdb5b1af02573c18ed69561b5df37c28d52745c1 (patch) | |
tree | e65858f3d7c94418724c01ed7fcaf69e7272738f /epan/dissectors/packet-iscsi.c | |
parent | 7cae4a40d04a764d206bc9202a80b384a0ad920b (diff) |
just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()
this will replace application crash by showing a dissector bug, which is the desired behaviour
there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too
one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.
svn path=/trunk/; revision=14608
Diffstat (limited to 'epan/dissectors/packet-iscsi.c')
-rw-r--r-- | epan/dissectors/packet-iscsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index 11506cd17d..eaeea6995d 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -1931,7 +1931,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean chec /* here we should use some default */ break; default: - g_assert_not_reached(); + DISSECTOR_ASSERT_NOT_REACHED(); } } |