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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu May 21 18:03:06 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 fc09b43..70a134e 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