summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/shim-data.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ipcpd/shim-data.c b/src/ipcpd/shim-data.c
index 6f5832a1..eb4ec33f 100644
--- a/src/ipcpd/shim-data.c
+++ b/src/ipcpd/shim-data.c
@@ -492,12 +492,10 @@ int shim_data_dir_query_wait(struct dir_query * query,
query->state = QUERY_PENDING;
- while (query->state == QUERY_PENDING) {
- if ((ret = -pthread_cond_timedwait(&query->cond,
- &query->lock,
- &abstime)) == -ETIMEDOUT)
- break;
- }
+ while (query->state == QUERY_PENDING && ret != -ETIMEDOUT)
+ ret = -pthread_cond_timedwait(&query->cond,
+ &query->lock,
+ &abstime);
if (query->state == QUERY_DESTROY)
ret = -1;