From f37aa8bed6114035343bf61e277b499855b75b36 Mon Sep 17 00:00:00 2001 From: Philip Maddox Date: Tue, 1 Oct 2019 16:41:55 -0400 Subject: [PATCH] ck_fifo: return fifo->garbage at spsc deinit (#146) This code was returning the head of the fifo as garbage during a de-init. It should instead return the fifo->garbage value. --- include/ck_fifo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ck_fifo.h b/include/ck_fifo.h index 6d50070..c9a6f3d 100644 --- a/include/ck_fifo.h +++ b/include/ck_fifo.h @@ -115,7 +115,7 @@ CK_CC_INLINE static void ck_fifo_spsc_deinit(struct ck_fifo_spsc *fifo, struct ck_fifo_spsc_entry **garbage) { - *garbage = fifo->head; + *garbage = fifo->garbage; fifo->head = fifo->tail = NULL; return; }