util: fix u_fifo_pop()
authorRob Clark <robdclark@chromium.org>
Sat, 28 Mar 2020 18:14:05 +0000 (11:14 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 30 Mar 2020 23:20:12 +0000 (23:20 +0000)
Seems like no one ever depended on it to actually return false when fifo
is empty.

Fixes: 6e61d062093 ("util: Add super simple fifo")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>

src/gallium/auxiliary/util/u_fifo.h

index a7aad6179d97065be5dee0f11d497c6136879cfc..b53a3ddd52d96adb4a108e84677d38c854ab544d 100644 (file)
@@ -80,7 +80,7 @@ u_fifo_pop(struct util_fifo *fifo, void **ptr)
 
    *ptr = array[fifo->tail];
 
-   ++fifo->num;
+   --fifo->num;
 
    return TRUE;
 }