summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-11-30 11:07:49 +0000
committerJim Meyering <jim@meyering.net>1997-11-30 11:07:49 +0000
commitf7acc655f405de41985fb5ae5408727d315c5c45 (patch)
treeba3b9b4b0f2fd8d7097b3e949193800e456de51f /src/ls.c
parente5781fe090ccec3a82476dff960f55013556ea76 (diff)
downloadcoreutils-f7acc655f405de41985fb5ae5408727d315c5c45.tar.xz
(print_long_format): Rename inner-scoped `buf' arrays to `hbuf'
to avoid shadowing local.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ls.c b/src/ls.c
index 19f4405d1..e1f486892 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2169,17 +2169,17 @@ print_long_format (const struct fileinfo *f)
if (print_inode)
{
- char buf[LONGEST_HUMAN_READABLE + 1];
+ char hbuf[LONGEST_HUMAN_READABLE + 1];
sprintf (p, "%*s ", INODE_DIGITS,
- human_readable ((uintmax_t) f->stat.st_ino, buf, 1, 1, 0));
+ human_readable ((uintmax_t) f->stat.st_ino, hbuf, 1, 1, 0));
p += strlen (p);
}
if (print_block_size)
{
- char buf[LONGEST_HUMAN_READABLE + 1];
+ char hbuf[LONGEST_HUMAN_READABLE + 1];
sprintf (p, "%*s ", block_size_size,
- human_readable ((uintmax_t) ST_NBLOCKS (f->stat), buf,
+ human_readable ((uintmax_t) ST_NBLOCKS (f->stat), hbuf,
ST_NBLOCKSIZE, output_units, 0));
p += strlen (p);
}
@@ -2211,10 +2211,10 @@ print_long_format (const struct fileinfo *f)
(unsigned) minor (f->stat.st_rdev));
else
{
- char buf[LONGEST_HUMAN_READABLE + 1];
+ char hbuf[LONGEST_HUMAN_READABLE + 1];
sprintf (p, "%8s ",
human_readable ((uintmax_t) f->stat.st_size,
- buf, 1, 1, human_readable_base));
+ hbuf, 1, 1, human_readable_base));
}
p += strlen (p);
@@ -2242,18 +2242,18 @@ print_long_format (const struct fileinfo *f)
{
/* The time cannot be represented as a local time;
print it as a huge integer number of seconds. */
- char buf[LONGEST_HUMAN_READABLE + 1];
+ char hbuf[LONGEST_HUMAN_READABLE + 1];
int width = full_time ? 24 : 12;
if (when < 0)
{
- const char *num = human_readable (- (uintmax_t) when, buf, 1, 1, 0);
+ const char *num = human_readable (- (uintmax_t) when, hbuf, 1, 1, 0);
int sign_width = width - strlen (num);
sprintf (p, "%*s%s ", sign_width < 0 ? 0 : sign_width, "-", num);
}
else
sprintf (p, "%*s ", width,
- human_readable ((uintmax_t) when, buf, 1, 1, 0));
+ human_readable ((uintmax_t) when, hbuf, 1, 1, 0));
p += strlen (p);
}