summaryrefslogtreecommitdiff
path: root/src/lib/shm_flow_set.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-10-23 07:54:29 +0000
committerSander Vrijders <[email protected]>2016-10-23 07:54:29 +0000
commit2a270c017e51f041997da666c1d9bea2ab189380 (patch)
tree9eda13e1fbe9a74836679f7b26d889a4e5448b2a /src/lib/shm_flow_set.c
parentcf97ff1b1971a676d04b6f0a16bb3c5bb53c933c (diff)
parent4bb18901fa222dc686886e7736e9935cfa1a4672 (diff)
downloadouroboros-2a270c017e51f041997da666c1d9bea2ab189380.tar.gz
ouroboros-2a270c017e51f041997da666c1d9bea2ab189380.zip
Merged in dstaesse/ouroboros/be-fix-build (pull request #270)
Some fixes
Diffstat (limited to 'src/lib/shm_flow_set.c')
-rw-r--r--src/lib/shm_flow_set.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/shm_flow_set.c b/src/lib/shm_flow_set.c
index f68773aa..3b1af83f 100644
--- a/src/lib/shm_flow_set.c
+++ b/src/lib/shm_flow_set.c
@@ -356,6 +356,7 @@ ssize_t shm_flow_set_wait(const struct shm_flow_set * shm_set,
assert(shm_set);
assert(idx < AP_MAX_FQUEUES);
+ assert(fqueue);
#ifdef __APPLE__
pthread_mutex_lock(shm_set->lock);
@@ -397,10 +398,11 @@ ssize_t shm_flow_set_wait(const struct shm_flow_set * shm_set,
memcpy(fqueue,
fqueue_ptr(shm_set, idx),
shm_set->heads[idx] * sizeof(int));
+ ret = shm_set->heads[idx];
shm_set->heads[idx] = 0;
}
pthread_cleanup_pop(true);
- return 0;
+ return ret;
}