libds

a collection of simple data structures
Log | Files | Refs | LICENSE

commit 1c6a976146697d192bdbf4f16abf37ee6a6f0fcf
parent f2112b77860c9db123e022524d502d4ffdd29abb
Author: sin <sin@2f30.org>
Date:   Tue,  8 Apr 2014 10:22:12 +0100

Fix style

Diffstat:
Mfifo.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fifo.c b/fifo.c @@ -39,7 +39,7 @@ fifo_add(struct fifo *fifo, const void *buf, size_t sz) { void *tmp; - if (!sz) + if (sz == 0) return 0; if (fifo->cap - fifo->sz >= sz) { memcpy(fifo->buf + fifo->sz, buf, sz); @@ -59,7 +59,7 @@ fifo_add(struct fifo *fifo, const void *buf, size_t sz) int fifo_remove(struct fifo *fifo, void *buf, size_t sz) { - if (!sz) + if (sz == 0) return 0; if (fifo->sz < sz) return -1;