]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
util: use UINT64_MAX
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 24 Mar 2015 02:47:23 +0000 (23:47 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 24 Mar 2015 02:47:23 +0000 (23:47 -0300)
Since we are checking the size of long and long long, use UINT64_MAX in
the fallback to be sure thre right size is being used.

shared/util.h

index 6f602d3ad21bb04be1a0d7d8927338a018e6ea4f..c6a31dfb205ab162730db8ba2fd051b09aa4faf7 100644 (file)
@@ -86,5 +86,5 @@ static inline bool addu64_overflow(uint64_t a, uint64_t b, uint64_t *res)
 #endif
 #endif
        *res = a + b;
-       return ULLONG_MAX - a < b;
+       return UINT64_MAX - a < b;
 }