From 9e7edd8467232b5c6b714d588d0e1528cc54151b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 7 Jun 2010 07:15:15 +0200 Subject: 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.] --- src/ls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ls.c') 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); } -- cgit v1.2.3-54-g00ecf