]> git.ozlabs.org Git - ccan/commitdiff
tally: Adapt divls64 to Samba coding conventions
authorVolker Lendecke <vl@samba.org>
Wed, 10 Aug 2011 17:51:26 +0000 (19:51 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 01:09:11 +0000 (10:39 +0930)
(Imported from SAMBA commit f589af19821e12aba6145492fd4ded58f07131b8)

ccan/tally/tally.c

index 9775cb4e62a3087e070cf9cd28dab8f4b7e051af..5602e75017055ae5ce20f71deaf4c80f2db55784 100644 (file)
@@ -302,8 +302,9 @@ static int64_t divls64(int64_t u1, uint64_t u0, int64_t v)
        vneg = v >> 63;           /* -1 if v < 0. */
        v = (v ^ vneg) - vneg;    /* Absolute value of v. */
 
-       if ((uint64_t)u1 >= (uint64_t)v)
+       if ((uint64_t)u1 >= (uint64_t)v) {
                goto overflow;
+       }
 
        q = divlu64(u1, u0, v);