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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Tue Mar  2 23:29:57 2010 +0100

POSIX: Fix signedness issue in EFAULT path of cond_wait_prologue

Fix this bug and use a consistent pattern for other occurrences as well.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 ksrc/skins/posix/syscall.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ksrc/skins/posix/syscall.c b/ksrc/skins/posix/syscall.c
index 61b8cee..6c3ec3a 100644
--- a/ksrc/skins/posix/syscall.c
+++ b/ksrc/skins/posix/syscall.c
@@ -1568,13 +1568,13 @@ static int __pthread_cond_wait_prologue(struct pt_regs 
*regs)
                                           &umx->shadow_mutex.lockcnt,
                                           &mx.shadow_mutex.lockcnt,
                                           sizeof(umx->shadow_mutex.lockcnt)))
-                       err = -EFAULT;
+                       return -EFAULT;
        }
 
        if (err == EINTR
            && __xn_safe_copy_to_user((void __user *)__xn_reg_arg3(regs),
                                      &count, sizeof(count)))
-                       err = EFAULT;
+                       return -EFAULT;
        
        return -err;
 }


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

Reply via email to