diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-05-19 14:16:40 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-05-20 13:08:01 -0400 |
commit | db1888d8454db4ae39a87809956e5e44bd0a7407 (patch) | |
tree | 9394565e39aaca7d17b417e82d8f8c3a77a862ba /eval.c | |
parent | 68d306f5b1288565e2d8afbedf1514ada1558509 (diff) | |
download | bfs-db1888d8454db4ae39a87809956e5e44bd0a7407.tar.xz |
Use `<< {10,20,...}` instead of `*1024*1024...`
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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]; |