summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/shm_du_map.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/shm_du_map.c b/src/lib/shm_du_map.c
index 6527e035..8d197232 100644
--- a/src/lib/shm_du_map.c
+++ b/src/lib/shm_du_map.c
@@ -91,13 +91,14 @@ static void garbage_collect(struct shm_du_map * dum)
{
#ifdef SHM_DU_MAP_MULTI_BLOCK
struct shm_du_buff * sdb;
- while ((sdb = get_tail_ptr(dum))->dst_api == -1 &&
- !shm_map_empty(dum))
+ while (!shm_map_empty(dum) &&
+ (sdb = get_tail_ptr(dum))->dst_api == -1)
+
*dum->ptr_tail = (*dum->ptr_tail + sdb->blocks)
& (SHM_BUFFER_SIZE - 1);
#else
- while (get_tail_ptr(dum)->dst_api == -1 &&
- !shm_map_empty(dum))
+ while (!shm_map_empty(dum) &&
+ get_tail_ptr(dum)->dst_api == -1)
*dum->ptr_tail =
(*dum->ptr_tail + 1) & (SHM_BUFFER_SIZE - 1);