From 3ca6dc39342c856dca7f1d9b861df966d06c506b Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 5 Jan 2020 17:23:07 +0100 Subject: [PATCH] change: unit index to integer --- discspan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discspan.c b/discspan.c index 342aef9..7447c1a 100644 --- a/discspan.c +++ b/discspan.c @@ -27,7 +27,7 @@ void printHumanReadSize(const char *output, unsigned long long int splitgroesse) { unsigned long long humanread; char einheit[6] = {'B', 'K', 'M', 'G', 'T', 'P'}; - char i = 0; + int i = 0; humanread = splitgroesse; while (humanread >= 1024) { @@ -39,7 +39,7 @@ void printHumanReadSize(const char *output, unsigned long long int splitgroesse) i = 0; printf("Restlicher Platz in Bytes(%s): %lld (%lld %c)\n", output, - splitgroesse, humanread, *(einheit + i)); + splitgroesse, humanread, einheit[i]); } /** -- 2.39.5