From: Volker Lendecke Date: Wed, 10 Aug 2011 17:51:26 +0000 (+0200) Subject: tally: Adapt divls64 to Samba coding conventions X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=63a3c0f3a8cf34e64f8ba9ba426537133fa71b2b tally: Adapt divls64 to Samba coding conventions (Imported from SAMBA commit f589af19821e12aba6145492fd4ded58f07131b8) --- diff --git a/ccan/tally/tally.c b/ccan/tally/tally.c index 9775cb4e..5602e750 100644 --- a/ccan/tally/tally.c +++ b/ccan/tally/tally.c @@ -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);