From db1888d8454db4ae39a87809956e5e44bd0a7407 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 19 May 2021 14:16:40 -0400 Subject: Use `<< {10,20,...}` instead of `*1024*1024...` --- eval.c | 10 +++++----- exec.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eval.c b/eval.c index df047f0..ba2a870 100644 --- a/eval.c +++ b/eval.c @@ -877,11 +877,11 @@ bool eval_size(const struct expr *expr, struct eval_state *state) { [SIZE_BLOCKS] = 512, [SIZE_BYTES] = 1, [SIZE_WORDS] = 2, - [SIZE_KB] = 1024, - [SIZE_MB] = 1024LL*1024, - [SIZE_GB] = 1024LL*1024*1024, - [SIZE_TB] = 1024LL*1024*1024*1024, - [SIZE_PB] = 1024LL*1024*1024*1024*1024, + [SIZE_KB] = 1LL << 10, + [SIZE_MB] = 1LL << 20, + [SIZE_GB] = 1LL << 30, + [SIZE_TB] = 1LL << 40, + [SIZE_PB] = 1LL << 50, }; off_t scale = scales[expr->size_unit]; diff --git a/exec.c b/exec.c index 71605e0..2856071 100644 --- a/exec.c +++ b/exec.c @@ -66,7 +66,7 @@ static size_t bfs_exec_arg_size(const char *arg) { } /** Even if we can pass a bigger argument list, cap it here. */ -#define BFS_EXEC_ARG_MAX (16*1024*1024) +#define BFS_EXEC_ARG_MAX (16 << 20) /** Determine the maximum argv size. */ static size_t bfs_exec_arg_max(const struct bfs_exec *execbuf) { -- cgit v1.2.3