summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-05-25 14:21:41 +0000
committerJim Meyering <jim@meyering.net>1997-05-25 14:21:41 +0000
commit1b71b3372e359d2908208364cd217ade0575c04b (patch)
treef00d2bc791950a0da7ad10dbbadafa7a7ad5fec4 /src
parent1bfb2c3ec71e4191669e6616ea838d0babc24474 (diff)
downloadcoreutils-1b71b3372e359d2908208364cd217ade0575c04b.tar.xz
(convert_blocks): Remove now-unnecessary #undef.
(du_files): Pass output_size unchanged to convert_blocks. No need to test output_size for size_bytes, convert_blocks handles that correctly. (count_entry): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/du.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/du.c b/src/du.c
index 98d2ce3c2..411fb1c12 100644
--- a/src/du.c
+++ b/src/du.c
@@ -51,7 +51,6 @@
#include "error.h"
#include "xstrtol.h"
-#undef convert_blocks
#define convert_blocks(b, size) (size == size_kilobytes ? ((b) + 1) / 2 : \
size == size_megabytes ? ((b) + 1024) / 2048 : (b))
@@ -513,8 +512,7 @@ du_files (char **files)
}
else
{
- printf (_("%ld\ttotal\n"), output_size == size_bytes ? tot_size
- : convert_blocks (tot_size, output_size == size_kilobytes));
+ printf (_("%ld\ttotal\n"), convert_blocks (tot_size, output_size));
}
fflush (stdout);
}
@@ -650,9 +648,7 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
}
else
{
- printf ("%ld\t%s\n", (output_size == size_bytes
- ? size
- : convert_blocks (size, output_size)),
+ printf ("%ld\t%s\n", convert_blocks (size, output_size),
path->length > 0 ? path->text : "/");
}
fflush (stdout);
@@ -674,8 +670,7 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
}
else
{
- printf ("%ld\t%s\n", output_size == size_bytes ? size
- : convert_blocks (size, output_size),
+ printf ("%ld\t%s\n", convert_blocks (size, output_size),
path->text);
}
fflush (stdout);