diff options
Diffstat (limited to 'src/libmdsclient')
-rw-r--r-- | src/libmdsclient/inbound.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmdsclient/inbound.c b/src/libmdsclient/inbound.c index f2ea03c..019ed51 100644 --- a/src/libmdsclient/inbound.c +++ b/src/libmdsclient/inbound.c @@ -554,8 +554,8 @@ int libmds_mspool_initialise(libmds_mspool_t* restrict this) this->messages = malloc(sizeof(libmds_message_t*)); if (this->messages == NULL) return -1; - if (sem_init(&(this->lock), 0, 1) < 0) goto fail; stage++; - if (sem_init(&(this->semaphore), 0, 0) < 0) goto fail; stage++; + if (sem_init(&(this->lock), 0, 1) < 0) goto fail; else stage++; + if (sem_init(&(this->semaphore), 0, 0) < 0) goto fail; else stage++; if (sem_init(&(this->wait_semaphore), 0, 0) < 0) goto fail; return 0; fail: |