nfq: suppress gcc analyzer warnings

pull/15636/head
Victor Julien 5 months ago
parent 79ef58be12
commit 7cb64cc20f

@ -567,6 +567,7 @@ static int NFQCallBack(struct nfq_q_handle *qh, struct nfgenmsg *nfmsg,
if (ret == -1) {
#ifdef COUNTERS
NFQQueueVars *q = NFQGetQueue(ntv->nfq_index);
DEBUG_VALIDATE_BUG_ON(q == NULL);
q->errs++;
q->pkts++;
q->bytes += GET_PKT_LEN(p);
@ -976,6 +977,7 @@ static void NFQRecvPkt(NFQQueueVars *t, NFQThreadVars *tv)
{
int ret;
int flag = NFQVerdictCacheLen(t) ? MSG_DONTWAIT : 0;
DEBUG_VALIDATE_BUG_ON(t == NULL);
int rv = recv(t->fd, tv->data, tv->datalen, flag);
if (rv < 0) {
@ -1049,6 +1051,7 @@ void ReceiveNFQThreadExitStats(ThreadVars *tv, void *data)
{
NFQThreadVars *ntv = (NFQThreadVars *)data;
NFQQueueVars *nq = NFQGetQueue(ntv->nfq_index);
DEBUG_VALIDATE_BUG_ON(nq == NULL);
#ifdef COUNTERS
SCLogNotice("(%s) Treated: Pkts %" PRIu32 ", Bytes %" PRIu64 ", Errors %" PRIu32 "",
tv->name, nq->pkts, nq->bytes, nq->errs);

Loading…
Cancel
Save