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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu May 21 18:02:30 2009 +0200

Fix signedness of divisor

---

 include/asm-generic/arith.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/arith.h b/include/asm-generic/arith.h
index 0ae4bca..4c266db 100644
--- a/include/asm-generic/arith.h
+++ b/include/asm-generic/arith.h
@@ -165,7 +165,7 @@ static inline __attribute__((__const__)) int 
__rthal_generic_imuldiv_ceil(int i,
 {
        /* Same as __rthal_generic_imuldiv, rounding up. */
        const unsigned long long ull = rthal_ullmul(i, mult);
-       return rthal_uldivrem(ull + div - 1, div, NULL);
+       return rthal_uldivrem(ull + (unsigned)div - 1, div, NULL);
 }
 #define rthal_imuldiv_ceil(i,m,d) __rthal_generic_imuldiv_ceil((i),(m),(d))
 #endif /* !rthal_imuldiv_ceil */


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

Reply via email to