summaryrefslogtreecommitdiff
path: root/src/lib/shm_rdrbuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/shm_rdrbuff.c')
-rw-r--r--src/lib/shm_rdrbuff.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/lib/shm_rdrbuff.c b/src/lib/shm_rdrbuff.c
index ce81d171..55047aa5 100644
--- a/src/lib/shm_rdrbuff.c
+++ b/src/lib/shm_rdrbuff.c
@@ -619,28 +619,20 @@ uint8_t * shm_du_buff_tail_alloc(struct shm_du_buff * sdb,
return buf;
}
-int shm_du_buff_head_release(struct shm_du_buff * sdb,
- size_t size)
+void shm_du_buff_head_release(struct shm_du_buff * sdb,
+ size_t size)
{
assert(sdb);
-
- if (size > sdb->du_tail - sdb->du_head)
- return -EOVERFLOW;
+ assert(!(size > sdb->du_tail - sdb->du_head));
sdb->du_head += size;
-
- return 0;
}
-int shm_du_buff_tail_release(struct shm_du_buff * sdb,
- size_t size)
+void shm_du_buff_tail_release(struct shm_du_buff * sdb,
+ size_t size)
{
assert(sdb);
-
- if (size > sdb->du_tail - sdb->du_head)
- return -EOVERFLOW;
+ assert(!(size > sdb->du_tail - sdb->du_head));
sdb->du_tail -= size;
-
- return 0;
}