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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Nov 11 19:32:53 2011 +0100

copperplate/semobj: fix return value of semobj_wait()

---

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

diff --git a/lib/copperplate/semobj.c b/lib/copperplate/semobj.c
index d1605ff..6105a8d 100644
--- a/lib/copperplate/semobj.c
+++ b/lib/copperplate/semobj.c
@@ -200,7 +200,7 @@ int semobj_broadcast(struct semobj *smobj)
 int semobj_wait(struct semobj *smobj, struct timespec *timeout)
 {
        struct syncstate syns;
-       int ret;
+       int ret = 0;
 
        ret = syncobj_lock(&smobj->core.sobj, &syns);
        if (ret)
@@ -236,7 +236,7 @@ int semobj_wait(struct semobj *smobj, struct timespec 
*timeout)
 done:
        syncobj_unlock(&smobj->core.sobj, &syns);
 
-       return 0;
+       return ret;
 }
 
 int semobj_getvalue(struct semobj *smobj, int *sval)


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to