[git commit] bc: 0xffffffffffffffff may be larger than unsigned long
Denys Vlasenko
vda.linux at googlemail.com
Mon Dec 10 14:15:42 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=c665c183f15f4246da3d44fba92883ef05fc98af
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
miscutils/bc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 71022569e..9774ac45b 100644
--- 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 == 0xffffffffffffffffULL)
bc_num_expand(n, 20); // 20 digits: 18446744073709551615
- BUILD_BUG_ON(ULONG_MAX > 0xffffffffffffffffUL);
+ BUILD_BUG_ON(ULONG_MAX > 0xffffffffffffffffULL);
ptr = n->num;
for (;;) {
More information about the busybox-cvs
mailing list