From 58f8347e84d2820cada64c513bb0f2b81ecd494a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 10 Jul 2016 16:00:34 +0200 Subject: Fix new GCC warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libmdsclient/inbound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libmdsclient') 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: -- cgit v1.2.3-70-g09d2