From b25b067d9333bd1160cae643b47467cb02914446 Mon Sep 17 00:00:00 2001 From: Sascha Steinbiss Date: Wed, 8 Feb 2017 12:40:00 +0100 Subject: [PATCH] alert: silence compiler type warning The `ts_ecr' and `ts_val' struct fields are integer types, not pointers. This leads GCC 6.3.0 to complain about comparisons to NULL. Signed-off-by: Sascha Steinbiss --- src/alert-prelude.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/alert-prelude.c b/src/alert-prelude.c index 2526320ac3..9c55b28154 100644 --- a/src/alert-prelude.c +++ b/src/alert-prelude.c @@ -512,10 +512,10 @@ static int PacketToData(const Packet *p, const PacketAlert *pa, idmef_alert_t *a AddIntData(alert, "tcp_win", TCP_GET_WINDOW(p)); AddIntData(alert, "tcp_sum", TCP_GET_SUM(p)); AddIntData(alert, "tcp_urp", TCP_GET_URG_POINTER(p)); - if (p->tcpvars.ts_val != NULL) { + if (p->tcpvars.ts_val != 0) { AddIntData(alert, "tcp_tsval", TCP_GET_TSVAL(p)); } - if (p->tcpvars.ts_ecr != NULL) { + if (p->tcpvars.ts_ecr != 0) { AddIntData(alert, "tcp_tsecr", TCP_GET_TSECR(p)); } if (p->tcph != NULL) { @@ -961,4 +961,3 @@ void AlertPreludeRegister (void) AlertPreludeThreadInit, AlertPreludeThreadDeinit, NULL); } #endif /* PRELUDE */ -