mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Replace UTIL_ARRAY_SIZE with ARRAY_SIZE
Replace `UTIL_ARRAY_SIZE` with `ARRAY_SIZE` and remove it from `util_base.h`. Acked-by: Jan Höppner <hoeppner@linux.ibm.com> Reviewed-by: Philipp Rudo <prudo@linux.ibm.com> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
6cf7f31746
commit
c673bacd7e
+1
-1
@@ -29,7 +29,7 @@ static void format_size(char *str, size_t size)
|
||||
{"byte", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"};
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < UTIL_ARRAY_SIZE(unit_vec); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(unit_vec); i++) {
|
||||
if (size / 1024 == 0) {
|
||||
sprintf(str, "%zu %s", size, unit_vec[i]);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user