]> gitweb.hhaalo.de Git - discspan.git/commitdiff
change: unit index to integer
authorBastian Dehn <hhaalo@arcor.de>
Sun, 5 Jan 2020 16:23:07 +0000 (17:23 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 5 Jan 2020 16:23:07 +0000 (17:23 +0100)
discspan.c

index 342aef98d238b50d631195a1c963f09d6985972a..7447c1a880132fa13f37086264e42a85a46d56c7 100644 (file)
@@ -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]);
 }
 
 /**