diff options
author | Jim Meyering <jim@meyering.net> | 1997-05-25 14:21:41 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-05-25 14:21:41 +0000 |
commit | 1b71b3372e359d2908208364cd217ade0575c04b (patch) | |
tree | f00d2bc791950a0da7ad10dbbadafa7a7ad5fec4 /src | |
parent | 1bfb2c3ec71e4191669e6616ea838d0babc24474 (diff) | |
download | coreutils-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.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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); |