diff options
author | Jim Meyering <meyering@redhat.com> | 2010-06-07 07:15:15 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-06-08 13:16:26 +0200 |
commit | 9e7edd8467232b5c6b714d588d0e1528cc54151b (patch) | |
tree | 3894cfe54cb210dbaf5a58a02e72600afc04141b /src/ls.c | |
parent | ad89ea6a0dc4a404871f87eef6e9727c07f4cfb6 (diff) | |
download | coreutils-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |