From 3ac1468c1bf8d9c062e63fcc5e71d15f6ed8e5eb Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 8 Mar 2016 15:13:03 +0100 Subject: [PATCH] packet pool: turn bad check into BUG_ON --- src/packet-queue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/packet-queue.c b/src/packet-queue.c index c500971bd1..4b47beb2fb 100644 --- a/src/packet-queue.c +++ b/src/packet-queue.c @@ -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) { -- 2.47.2