if (SIZE_MAX < n_elide_0 + READ_BUFSIZE)
{
- char umax_buf[INT_BUFSIZE_BOUND (uintmax_t)];
+ char umax_buf[INT_BUFSIZE_BOUND (n_elide_0)];
error (EXIT_FAILURE, 0, _("%s: number of bytes is too large"),
umaxtostr (n_elide_0, umax_buf));
}
pos -= bytes_read;
if (lseek (fd, pos, SEEK_SET) < 0)
{
- char offset_buf[INT_BUFSIZE_BOUND (off_t)];
+ char offset_buf[INT_BUFSIZE_BOUND (pos)];
error (0, errno, _("%s: cannot seek to offset %s"),
pretty_filename, offtostr (pos, offset_buf));
return false;
pos -= BUFSIZ;
if (lseek (fd, pos, SEEK_SET) < 0)
{
- char offset_buf[INT_BUFSIZE_BOUND (off_t)];
+ char offset_buf[INT_BUFSIZE_BOUND (pos)];
error (0, errno, _("%s: cannot seek to offset %s"),
pretty_filename, offtostr (pos, offset_buf));
return false;
if ( ! count_lines && elide_from_end && OFF_T_MAX < n_units)
{
- char umax_buf[INT_BUFSIZE_BOUND (uintmax_t)];
+ char umax_buf[INT_BUFSIZE_BOUND (n_units)];
error (EXIT_FAILURE, 0, _("%s: number of bytes is too large"),
umaxtostr (n_units, umax_buf));
}
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;
}
else
{
- char buf[INT_BUFSIZE_BOUND (unsigned long int)];
+ char buf[INT_BUFSIZE_BOUND (id)];
sprintf (buf, "%lu", id);
return strlen (buf);
}
xlseek (int fd, off_t offset, int whence, char const *filename)
{
off_t new_offset = lseek (fd, offset, whence);
- char buf[INT_BUFSIZE_BOUND (off_t)];
+ char buf[INT_BUFSIZE_BOUND (offset)];
char *s;
if (0 <= new_offset)