aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/peekclassic.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2021-05-24 00:46:43 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-06-06 20:05:26 +0000
commit4aff36d501400552d7df59473db17ef7add8b11c (patch)
tree05518b1962382e2c4edf5935e9c4284747a0b302 /wiretap/peekclassic.c
parentef0f022f8629009daf7c31e204b9d65b1805f6e4 (diff)
Replace g_assert() with ws_assert() in places
Diffstat (limited to 'wiretap/peekclassic.c')
-rw-r--r--wiretap/peekclassic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wiretap/peekclassic.c b/wiretap/peekclassic.c
index bdd17877a2..906594e845 100644
--- a/wiretap/peekclassic.c
+++ b/wiretap/peekclassic.c
@@ -27,6 +27,7 @@
#include <wsutil/epochs.h>
#include <wsutil/802_11-utils.h>
+#include <wsutil/ws_assert.h>
#include "wtap-int.h"
#include "file_wrappers.h"
@@ -172,7 +173,7 @@ wtap_open_return_val peekclassic_open(wtap *wth, int *err, gchar **err_info)
* is zero, and check some other fields; this isn't perfect,
* and we may have to add more checks at some point.
*/
- g_assert(sizeof(ep_hdr.master) == PEEKCLASSIC_MASTER_HDR_SIZE);
+ ws_assert(sizeof(ep_hdr.master) == PEEKCLASSIC_MASTER_HDR_SIZE);
if (!wtap_read_bytes(wth->fh, &ep_hdr.master,
(int)sizeof(ep_hdr.master), err, err_info)) {
if (*err != WTAP_ERR_SHORT_READ)
@@ -201,7 +202,7 @@ wtap_open_return_val peekclassic_open(wtap *wth, int *err, gchar **err_info)
case 6:
case 7:
/* get the secondary header */
- g_assert(sizeof(ep_hdr.secondary.v567) ==
+ ws_assert(sizeof(ep_hdr.secondary.v567) ==
PEEKCLASSIC_V567_HDR_SIZE);
if (!wtap_read_bytes(wth->fh, &ep_hdr.secondary.v567,
(int)sizeof(ep_hdr.secondary.v567), err, err_info)) {
@@ -343,7 +344,7 @@ wtap_open_return_val peekclassic_open(wtap *wth, int *err, gchar **err_info)
default:
/* this is impossible */
- g_assert_not_reached();
+ ws_assert_not_reached();
}
wth->snapshot_length = 0; /* not available in header */