Solve little output issue in du(1)

Don't run the size throug nblks() twice.
This commit is contained in:
FRIGN 2015-04-05 23:28:49 +02:00 committed by sin
parent bb2c0cff45
commit d8e829a88d

2
du.c
View File

@ -100,7 +100,7 @@ main(int argc, char *argv[])
if (!argc) { if (!argc) {
recurse(".", &n, &r); recurse(".", &n, &r);
printpath(nblks(n), "."); printpath(n, ".");
} else { } else {
for (; *argv; argc--, argv++) { for (; *argv; argc--, argv++) {
recurse(*argv, &n, &r); recurse(*argv, &n, &r);