projects
/
platform
/
upstream
/
kmod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cc8a20
)
util: use UINT64_MAX
author
Lucas De Marchi
<lucas.demarchi@intel.com>
Tue, 24 Mar 2015 02:47:23 +0000
(23:47 -0300)
committer
Lucas 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
patch
|
blob
|
history
diff --git
a/shared/util.h
b/shared/util.h
index
6f602d3
..
c6a31df
100644
(file)
--- a/
shared/util.h
+++ b/
shared/util.h
@@
-86,5
+86,5
@@
static inline bool addu64_overflow(uint64_t a, uint64_t b, uint64_t *res)
#endif
#endif
*res = a + b;
- return U
LLONG
_MAX - a < b;
+ return U
INT64
_MAX - a < b;
}