projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b4cf0d
)
bc: 0xffffffffffffffff may be larger than unsigned long
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 10 Dec 2018 14:15:42 +0000
(15:15 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 10 Dec 2018 14:15:42 +0000
(15:15 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c
patch
|
blob
|
history
diff --git
a/miscutils/bc.c
b/miscutils/bc.c
index 71022569e420893843d49125af83b2f275bc69e0..9774ac45b53c69f691136cd9136e3398f64f333a 100644
(file)
--- a/
miscutils/bc.c
+++ b/
miscutils/bc.c
@@
-1476,9
+1476,9
@@
static void bc_num_ulong2num(BcNum *n, unsigned long val)
if (ULONG_MAX == 0xffffffffUL)
bc_num_expand(n, 10); // 10 digits: 4294967295
- if (ULONG_MAX == 0xffffffffffffffffUL)
+ if (ULONG_MAX == 0xffffffffffffffffUL
L
)
bc_num_expand(n, 20); // 20 digits: 18446744073709551615
- BUILD_BUG_ON(ULONG_MAX > 0xffffffffffffffffUL);
+ BUILD_BUG_ON(ULONG_MAX > 0xffffffffffffffffUL
L
);
ptr = n->num;
for (;;) {