summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-06-07 07:15:15 +0200
committerJim Meyering <meyering@redhat.com>2010-06-08 13:16:26 +0200
commit9e7edd8467232b5c6b714d588d0e1528cc54151b (patch)
tree3894cfe54cb210dbaf5a58a02e72600afc04141b /src/ls.c
parentad89ea6a0dc4a404871f87eef6e9727c07f4cfb6 (diff)
downloadcoreutils-9e7edd8467232b5c6b714d588d0e1528cc54151b.tar.xz
maint: adjust INT_BUFSIZE_BOUND usage for maintainability
* src/tail.c (xlseek): Give INT_BUFSIZE_BOUND a variable name, not a type name. * src/ls.c (gobble_file, format_user_or_group_width): Likewise. * src/head.c (elide_tail_bytes_pipe): Likewise. (elide_tail_lines_seekable, main): Likewise. [This change is not complete -- there are doubtless other uses that can be updated in the same way.]
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ls.c b/src/ls.c
index 954913085..4e0a036c8 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2986,7 +2986,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
if (format == long_format)
{
- char b[INT_BUFSIZE_BOUND (uintmax_t)];
+ char b[INT_BUFSIZE_BOUND (f->stat.st_nlink)];
int b_len = strlen (umaxtostr (f->stat.st_nlink, b));
if (nlink_width < b_len)
nlink_width = b_len;
@@ -3582,7 +3582,7 @@ format_user_or_group_width (char const *name, unsigned long int id)
}
else
{
- char buf[INT_BUFSIZE_BOUND (unsigned long int)];
+ char buf[INT_BUFSIZE_BOUND (id)];
sprintf (buf, "%lu", id);
return strlen (buf);
}