aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ncp2222.inc
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-06-10 18:28:22 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-06-10 18:28:22 +0000
commitfdb5b1af02573c18ed69561b5df37c28d52745c1 (patch)
treee65858f3d7c94418724c01ed7fcaf69e7272738f /epan/dissectors/packet-ncp2222.inc
parent7cae4a40d04a764d206bc9202a80b384a0ad920b (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-ncp2222.inc')
-rw-r--r--epan/dissectors/packet-ncp2222.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc
index 35f0c74507..7641a0a9de 100644
--- a/epan/dissectors/packet-ncp2222.inc
+++ b/epan/dissectors/packet-ncp2222.inc
@@ -1225,7 +1225,7 @@ process_bitfield_sub_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
/* Use it */
sub_rec = rec->sub_ptvc_rec->ptvc_rec;
while(sub_rec->hf_ptr != NULL) {
- g_assert(!sub_rec->sub_ptvc_rec);
+ DISSECTOR_ASSERT(!sub_rec->sub_ptvc_rec);
ptvcursor_add_no_advance(sub_ptvc, *sub_rec->hf_ptr,
sub_rec->length, sub_rec->endianness);
sub_rec++;
@@ -1334,7 +1334,7 @@ _process_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
func = padd_uni;
break;
default:
- g_assert_not_reached();
+ DISSECTOR_ASSERT_NOT_REACHED();
}
item = func(ptvc, rec);
@@ -1349,7 +1349,7 @@ _process_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
* Actually, we could, as long as we don't
* *use* that var; for now keep this assert in
* place. */
- g_assert(rec->var_index == NO_VAR);
+ DISSECTOR_ASSERT(rec->var_index == NO_VAR);
ptvcursor_advance(ptvc, rec->length);
}
}
@@ -1372,7 +1372,7 @@ _process_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
func = padd_uni;
break;
default:
- g_assert_not_reached();
+ DISSECTOR_ASSERT_NOT_REACHED();
}
for (i = 0; i < repeat_count; i++ ) {
func(ptvc, rec);
@@ -4327,7 +4327,7 @@ nds_defrag(tvbuff_t *tvb, packet_info *pinfo, guint16 nw_connection, guint8 sequ
if (frags[i].nds_frag == 0xffffffff)
{
/* Error can't find fragment */
- /*g_assert(0);*/
+ /*DISSECTOR_ASSERT(0);*/
}
frag_count = i;
/* Remember this fragment information so we can dissect.