X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=lib%2Fnum2str.c;h=ed3545d95634553640d3ccaf537e0e436d432ac2;hp=940d4a5e289133a03c89569dc3cca01a5e604b4c;hb=b920b29b99829221550e6620b7b699abdef1a712;hpb=248c94366c4e5806d7356b50e39438b4ac32f8b8 diff --git a/lib/num2str.c b/lib/num2str.c index 940d4a5e..ed3545d9 100644 --- a/lib/num2str.c +++ b/lib/num2str.c @@ -4,8 +4,6 @@ #include "../fio.h" -#define ARRAY_LENGTH(arr) sizeof(arr) / sizeof((arr)[0]) - /** * num2str() - Cheesy number->string conversion, complete with carry rounding error. * @num: quantity (e.g., number of blocks, bytes or bits) @@ -75,7 +73,7 @@ char *num2str(uint64_t num, int maxlen, int base, int pow2, int units) if (modulo == -1U) { done: - if (post_index >= ARRAY_LENGTH(sistr)) + if (post_index >= ARRAY_SIZE(sistr)) post_index = 0; sprintf(buf, "%llu%s%s", (unsigned long long) num,