]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
packet pool: turn bad check into BUG_ON
authorVictor Julien <victor@inliniac.net>
Tue, 8 Mar 2016 14:13:03 +0000 (15:13 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 8 Mar 2016 14:13:03 +0000 (15:13 +0100)
src/packet-queue.c

index c500971bd12042ec3300a823f1640c0a9c4915ac..4b47beb2fb44860570670abc1d08c98b5c2b79bd 100644 (file)
@@ -175,12 +175,11 @@ Packet *PacketDequeue (PacketQueue *q)
 
     /* pull the bottom packet from the queue */
     p = q->bot;
+
     /* Weird issue: sometimes it looks that two thread arrive
      * here at the same time so the bot ptr is NULL (only on OS X?)
      */
-    if (p == NULL) {
-        return NULL;
-    }
+    BUG_ON (p == NULL);
 
     /* more packets in queue */
     if (q->bot->prev != NULL) {