summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp/main.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/ipcpd/shim-udp/main.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/ipcpd/shim-udp/main.c')
-rw-r--r--src/ipcpd/shim-udp/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c
index e3f7fcdd..0802583c 100644
--- a/src/ipcpd/shim-udp/main.c
+++ b/src/ipcpd/shim-udp/main.c
@@ -204,8 +204,7 @@ static int port_id_to_fd(int port_id)
static ssize_t ipcp_udp_flow_write(int fd, void * buf, size_t count)
{
- /* the AP chooses the amount of headspace and tailspace */
- size_t index;
+ ssize_t index;
struct rb_entry e;
rw_lock_rdlock(&_ipcp->state_lock);