Module: xenomai-forge
Branch: master
Commit: 18df09fe685720d8067bd6063b2171bf38da16b3
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=18df09fe685720d8067bd6063b2171bf38da16b3

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Sep 10 17:56:21 2013 +0200

lib/cobalt: sem: fix error propagation in sem_destroy()

---

 lib/cobalt/semaphore.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cobalt/semaphore.c b/lib/cobalt/semaphore.c
index 6af52a6..41a77c8 100644
--- a/lib/cobalt/semaphore.c
+++ b/lib/cobalt/semaphore.c
@@ -52,11 +52,11 @@ COBALT_IMPL(int, sem_destroy, (sem_t *sem))
                return -1;
        }
 
-       err = -XENOMAI_SKINCALL1(__cobalt_muxid, sc_cobalt_sem_destroy, _sem);
+       err = XENOMAI_SKINCALL1(__cobalt_muxid, sc_cobalt_sem_destroy, _sem);
        if (err >= 0)
                return err;
 
-       errno = err;
+       errno = -err;
        return -1;
 }
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to