summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-05-16 17:05:36 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-05-16 17:29:22 +0200
commitca914eb17bfdb2e56a39951a96a9fb54e1a5f607 (patch)
treec552c75886dd88eb9ebdc3e31ea92df17df1f7fd /src/lib/dev.c
parentcd14d5db7abdb12b5e46a6c055daf5304bb43b74 (diff)
downloadouroboros-ca914eb17bfdb2e56a39951a96a9fb54e1a5f607.tar.gz
ouroboros-ca914eb17bfdb2e56a39951a96a9fb54e1a5f607.zip
lib: Add missing modulo calculation
Adds a missing modulo calculation that would result in index -1 being returned instead of zero when the ringbuffer skipped back to the beginning.
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r--src/lib/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 9b29b992..c365a17b 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -531,7 +531,7 @@ int flow_cntl(int fd, int cmd, int oflags)
ssize_t flow_write(int fd, void * buf, size_t count)
{
- size_t index;
+ ssize_t index;
struct rb_entry e;
if (buf == NULL)