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:
2
ls.c
2
ls.c
@@ -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));
|
||||
|
Reference in New Issue
Block a user