From: Bastian Dehn Date: Sun, 5 Jan 2020 16:23:07 +0000 (+0100) Subject: change: unit index to integer X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=3ca6dc39342c856dca7f1d9b861df966d06c506b;p=discspan.git change: unit index to integer --- 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]); } /**