summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-08-10 19:50:52 +0200
committerVolker Lendecke <vl@samba.org>2011-08-10 19:56:11 +0200
commitb32f086d643eb39c3806e30b19a028e6a59f0054 (patch)
treeb893a410ef50b2fb5f49af945e669a4a3ee74b72
parentee91004f4bddcda873f8ccde1db16609a66a493b (diff)
downloadsamba-b32f086d643eb39c3806e30b19a028e6a59f0054.tar.gz
samba-b32f086d643eb39c3806e30b19a028e6a59f0054.tar.bz2
samba-b32f086d643eb39c3806e30b19a028e6a59f0054.zip
Avoid some // style comments in divls64
-rw-r--r--lib/ccan/tally/tally.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c
index d9f30ba12f..9775cb4e62 100644
--- a/lib/ccan/tally/tally.c
+++ b/lib/ccan/tally/tally.c
@@ -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;