Convert humansize() to accept a size_t instead of a double

General convention is to use size_t to store sizes of all kinds.
Internally, the function uses double anyway, but at least this
doesn't clobber up the API any more and there's a chance in the
future to make this function a bit cleaner and not use this dirty
static buffer hack any more.
This commit is contained in:
FRIGN
2015-04-25 00:27:20 +02:00
zatwierdzone przez sin
rodzic 9016d288f1
commit 5595af5742
3 zmienionych plików z 10 dodań i 8 usunięć

2
ls.c
Wyświetl plik

@@ -162,7 +162,7 @@ output(const struct entry *ent)
printf("%s %4ld %-8.8s %-8.8s ", mode, (long)ent->nlink, pwname, grname);
if (hflag)
printf("%10s ", humansize((unsigned long)ent->size));
printf("%10s ", humansize(ent->size));
else
printf("%10lu ", (unsigned long)ent->size);
printf("%s %s%s", buf, ent->name, indicator(ent->mode));