diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2021-05-24 00:46:43 +0100 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-06-06 20:05:26 +0000 |
commit | 4aff36d501400552d7df59473db17ef7add8b11c (patch) | |
tree | 05518b1962382e2c4edf5935e9c4284747a0b302 /wiretap/ngsniffer.c | |
parent | ef0f022f8629009daf7c31e204b9d65b1805f6e4 (diff) |
Replace g_assert() with ws_assert() in places
Diffstat (limited to 'wiretap/ngsniffer.c')
-rw-r--r-- | wiretap/ngsniffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 97504dffcf..b4cb3510ab 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -47,6 +47,7 @@ #include "wtap-int.h" #include "file_wrappers.h" #include "ngsniffer.h" +#include <wsutil/ws_assert.h> /* Magic number in Sniffer files. */ static const char ngsniffer_magic[] = { @@ -1115,7 +1116,7 @@ ngsniffer_seek_read(wtap *wth, gint64 seek_off, /* * "Can't happen". */ - g_assert_not_reached(); + ws_assert_not_reached(); return FALSE; } @@ -2500,7 +2501,7 @@ ng_read_bytes_or_eof(wtap *wth, void *buffer, unsigned int nbytes, gboolean is_r random stream open, allocate the first element for the list of blobs, and make it the last element as well. */ if (wth->random_fh != NULL) { - g_assert(ngsniffer->first_blob == NULL); + ws_assert(ngsniffer->first_blob == NULL); blob = g_new(blob_info_t,1); blob->blob_comp_offset = comp_stream->comp_offset; blob->blob_uncomp_offset = comp_stream->uncomp_offset; @@ -2829,7 +2830,7 @@ ng_file_seek_rand(wtap *wth, gint64 offset, int *err, gchar **err_info) the blob, as otherwise it'd mean we need to seek before the beginning or after the end of this blob. */ delta = offset - ngsniffer->rand.uncomp_offset; - g_assert(delta >= 0 && (unsigned long)delta < ngsniffer->rand.nbytes); + ws_assert(delta >= 0 && (unsigned long)delta < ngsniffer->rand.nbytes); } /* OK, the place to which we're seeking is in the buffer; adjust |