X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftally%2Ftally.c;h=5602e75017055ae5ce20f71deaf4c80f2db55784;hp=9775cb4e62a3087e070cf9cd28dab8f4b7e051af;hb=63a3c0f3a8cf34e64f8ba9ba426537133fa71b2b;hpb=9dba5bf0cb3f74bf9bcaebd8c63ceaa8c6dcbbab;ds=sidebyside 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);