libds

simple data structures library and utility functions
git clone git://git.2f30.org/libds.git
Log | Files | Refs | LICENSE

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

Fix style

Diffstat:
fifo.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;