summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-07-25 15:34:58 +0000
committerJim Meyering <jim@meyering.net>2006-07-25 15:34:58 +0000
commitfd991bcc5749ec6709d8f56d4eb846ab1ff8865c (patch)
tree1ff6f3e0f90410024fcc7d6f16983473ce797a57
parentef79e4ea3b6519d53be6af3808ec66e4159de217 (diff)
downloadcoreutils-fd991bcc5749ec6709d8f56d4eb846ab1ff8865c.tar.xz
* src/dircolors.hin: Mention that ORPHAN refers not just to dangling symlinks.
-rw-r--r--ChangeLog2
-rw-r--r--src/ls.c26
2 files changed, 15 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 7cfcb95da..14fd89dd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2006-07-25 Jim Meyering <jim@meyering.net>
+ * src/ls.c: Add parens around most uses of ?: ternary operator.
+
* src/dircolors.hin: Mention that ORPHAN refers not just to dangling
symlinks.
diff --git a/src/ls.c b/src/ls.c
index 37e206cb6..b3efe53f3 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -3404,10 +3404,10 @@ print_long_format (const struct fileinfo *f)
{
char hbuf[LONGEST_HUMAN_READABLE + 1];
char const *blocks =
- f->stat_failed
- ? "?"
- : human_readable (ST_NBLOCKS (f->stat), hbuf, human_output_opts,
- ST_NBLOCKSIZE, output_block_size);
+ (f->stat_failed
+ ? "?"
+ : human_readable (ST_NBLOCKS (f->stat), hbuf, human_output_opts,
+ ST_NBLOCKSIZE, output_block_size));
int pad;
for (pad = block_size_width - mbswidth (blocks, 0); 0 < pad; pad--)
*p++ = ' ';
@@ -3465,10 +3465,10 @@ print_long_format (const struct fileinfo *f)
{
char hbuf[LONGEST_HUMAN_READABLE + 1];
char const *size =
- f->stat_failed
- ? "?"
- : human_readable (unsigned_file_size (f->stat.st_size),
- hbuf, human_output_opts, 1, file_output_block_size);
+ (f->stat_failed
+ ? "?"
+ : human_readable (unsigned_file_size (f->stat.st_size),
+ hbuf, human_output_opts, 1, file_output_block_size));
int pad;
for (pad = file_size_width - mbswidth (size, 0); 0 < pad; pad--)
*p++ = ' ';
@@ -3528,11 +3528,11 @@ print_long_format (const struct fileinfo *f)
print it as a huge integer number of seconds. */
char hbuf[INT_BUFSIZE_BOUND (intmax_t)];
sprintf (p, "%*s ", long_time_expected_width (),
- f->stat_failed
- ? "?"
- : (TYPE_SIGNED (time_t)
- ? imaxtostr (when, hbuf)
- : umaxtostr (when, hbuf)));
+ (f->stat_failed
+ ? "?"
+ : (TYPE_SIGNED (time_t)
+ ? imaxtostr (when, hbuf)
+ : umaxtostr (when, hbuf))));
p += strlen (p);
}