From fa5b042ac65ee8672d3fe586319ecfe5b2149882 Mon Sep 17 00:00:00 2001 From: Kim Walisch Date: Tue, 30 Jul 2024 18:15:00 +0200 Subject: [PATCH] Update to latest libdivide --- include/libdivide.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libdivide.h b/include/libdivide.h index 716b95f4..44218887 100644 --- a/include/libdivide.h +++ b/include/libdivide.h @@ -513,7 +513,7 @@ static LIBDIVIDE_INLINE uint64_t libdivide_128_div_64_to_64( // Check for overflow and divide by 0. if (numhi >= den) { - if (r != NULL) *r = ~0ull; + if (r) *r = ~0ull; return ~0ull; } @@ -559,7 +559,7 @@ static LIBDIVIDE_INLINE uint64_t libdivide_128_div_64_to_64( q0 = (uint32_t)qhat; // Return remainder if requested. - if (r != NULL) *r = (rem * b + num0 - q0 * den) >> shift; + if (r) *r = (rem * b + num0 - q0 * den) >> shift; return ((uint64_t)q1 << 32) | q0; #endif }