X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=stat.c;h=f9c6985338d998095fd35a229d8b0be5ed533760;hp=9810e419852330f7353240884c62b0f9107ddd2a;hb=db64e9bc34d621647a255c918a5b7416ca0b6076;hpb=6d663077379b40e1ec6e2321fe8a731087777d32 diff --git a/stat.c b/stat.c index 9810e419..f9c69853 100644 --- a/stat.c +++ b/stat.c @@ -21,8 +21,8 @@ static char *num2str(unsigned long num, int maxlen, int base) * could be passed in for 10^3 base, but every caller expects * 2^10 base right now. */ - const int thousand = 1024; - char postfix[] = { 'K', 'M', 'G', 'P' }; + const unsigned int thousand = 1024; + char postfix[] = { 'K', 'M', 'G', 'P', 'E' }; char *buf; int i; @@ -47,7 +47,7 @@ static char *num2str(unsigned long num, int maxlen, int base) num /= thousand; num += carry; i++; - } while (i <= 4); + } while (i <= 5); return buf; }