author Volker Lendecke Wed, 10 Aug 2011 17:50:52 +0000 (19:50 +0200) committer Rusty Russell Wed, 31 Aug 2011 01:09:11 +0000 (10:39 +0930)
(Imported from SAMBA commit b32f086d643eb39c3806e30b19a028e6a59f0054)

@@ -292,26 +292,27 @@ static int64_t divls64(int64_t u1, uint64_t u0, int64_t v)
{
int64_t q, uneg, vneg, diff, borrow;

{
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;
}

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);

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;
q = 0x8000000000000000ULL;
}
return q;