Skip to content

Commit d6f035f

Browse files
committed
GCC AVR does not support NULL
1 parent 37a5061 commit d6f035f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libdivide.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ static LIBDIVIDE_INLINE uint64_t libdivide_128_div_64_to_64(
513513

514514
// Check for overflow and divide by 0.
515515
if (numhi >= den) {
516-
if (r != NULL) *r = ~0ull;
516+
if (r) *r = ~0ull;
517517
return ~0ull;
518518
}
519519

@@ -559,7 +559,7 @@ static LIBDIVIDE_INLINE uint64_t libdivide_128_div_64_to_64(
559559
q0 = (uint32_t)qhat;
560560

561561
// Return remainder if requested.
562-
if (r != NULL) *r = (rem * b + num0 - q0 * den) >> shift;
562+
if (r) *r = (rem * b + num0 - q0 * den) >> shift;
563563
return ((uint64_t)q1 << 32) | q0;
564564
#endif
565565
}

0 commit comments

Comments
 (0)