Hi,

This patch replaces g_assert() calls in epan/stream.c with DISSECTOR_ASSERT().

Cheers

Richard

Index: epan/stream.c
===================================================================
--- epan/stream.c	(revision 11875)
+++ epan/stream.c	(working copy)
@@ -380,7 +380,7 @@
     /* we don't want to replace the previous data if we get called twice on the
        same circuit, so do a lookup first */
     stream = stream_hash_lookup_circ(circuit, p2p_dir);
-    g_assert( stream == NULL );
+    DISSECTOR_ASSERT( stream == NULL );
 
     stream = stream_hash_insert_circ(circuit, p2p_dir);
     
@@ -394,7 +394,7 @@
     /* we don't want to replace the previous data if we get called twice on the
        same conversation, so do a lookup first */
     stream = stream_hash_lookup_conv(conv, p2p_dir);
-    g_assert( stream == NULL );
+    DISSECTOR_ASSERT( stream == NULL );
 
     stream = stream_hash_insert_conv(conv, p2p_dir);
     return stream;
@@ -445,10 +445,10 @@
     stream_pdu_t *pdu;
     stream_pdu_fragment_t *frag_data;
 
-    g_assert(stream);
+    DISSECTOR_ASSERT(stream);
 
     /* check that this fragment is at the end of the stream */
-    g_assert( framenum > stream->lastfrag_framenum ||
+    DISSECTOR_ASSERT( framenum > stream->lastfrag_framenum ||
 	      (framenum == stream->lastfrag_framenum && offset > stream->lastfrag_offset));
 
 
@@ -492,7 +492,7 @@
     gboolean *update_col_infop, proto_tree *tree)
 {
     stream_pdu_t *pdu;
-    g_assert(frag);
+    DISSECTOR_ASSERT(frag);
     pdu = frag->pdu;
 
     /* we handle non-terminal fragments ourselves, because
@@ -512,18 +512,18 @@
     
 guint32 stream_get_frag_length( const stream_pdu_fragment_t *frag)
 {
-    g_assert( frag );
+    DISSECTOR_ASSERT( frag );
     return frag->len;
 }
 
 fragment_data *stream_get_frag_data( const stream_pdu_fragment_t *frag)
 {
-    g_assert( frag );
+    DISSECTOR_ASSERT( frag );
     return frag->pdu->fd_head;
 }
 
 guint32 stream_get_pdu_no( const stream_pdu_fragment_t *frag)
 {
-    g_assert( frag );
+    DISSECTOR_ASSERT( frag );
     return frag->pdu->pdu_number;
 }
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@wireshark.org
http://www.wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to