From 1b71b3372e359d2908208364cd217ade0575c04b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 25 May 1997 14:21:41 +0000 Subject: [PATCH] (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. --- src/du.c | 11 +++-------- 1 file 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); -- 2.34.1