tally: Avoid some // style comments in divls64
authorVolker Lendecke <vl@samba.org>
Wed, 10 Aug 2011 17:50:52 +0000 (19:50 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 01:09:11 +0000 (10:39 +0930)
(Imported from SAMBA commit b32f086d643eb39c3806e30b19a028e6a59f0054)

ccan/tally/tally.c

index d9f30ba12f39cc87c94d2e0e12c4af23177b8add..9775cb4e62a3087e070cf9cd28dab8f4b7e051af 100644 (file)
@@ -292,26 +292,27 @@ static int64_t divls64(int64_t u1, uint64_t u0, int64_t v)
 {
        int64_t q, uneg, vneg, diff, borrow;
 
-       uneg = u1 >> 63;          // -1 if u < 0.
-       if (uneg) {               // Compute the absolute
-               u0 = -u0;         // value of the dividend u.
+       uneg = u1 >> 63;          /* -1 if u < 0. */
+       if (uneg) {               /* Compute the absolute */
+               u0 = -u0;         /* value of the dividend u. */
                borrow = (u0 != 0);
                u1 = -u1 - borrow;
        }
 
-       vneg = v >> 63;           // -1 if v < 0.
-       v = (v ^ vneg) - vneg;    // Absolute value of v.
+       vneg = v >> 63;           /* -1 if v < 0. */
+       v = (v ^ vneg) - vneg;    /* Absolute value of v. */
 
        if ((uint64_t)u1 >= (uint64_t)v)
                goto overflow;
 
        q = divlu64(u1, u0, v);
 
-       diff = uneg ^ vneg;       // Negate q if signs of
-       q = (q ^ diff) - diff;    // u and v differed.
+       diff = uneg ^ vneg;       /* Negate q if signs of */
+       q = (q ^ diff) - diff;    /* u and v differed. */
 
-       if ((diff ^ q) < 0 && q != 0) {    // If overflow, return the largest
-       overflow:                          // possible neg. quotient.
+       if ((diff ^ q) < 0 && q != 0) {    /* If overflow, return the
+                                             largest */
+       overflow:                          /* possible neg. quotient. */
                q = 0x8000000000000000ULL;
        }
        return q;