From 676991e63002085ae302e101129cc48f56148d3e Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 29 Apr 2002 07:30:57 +0000 Subject: (parse_obsolescent_option): Do not limit the maximum line/byte count to be less than ULONG_MAX on systems where OFF_T_MAX is larger. --- src/tail.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/tail.c') diff --git a/src/tail.c b/src/tail.c index 23ad66373..73b3ab717 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1360,13 +1360,13 @@ parse_obsolescent_option (int argc, const char *const *argv, else { strtol_error s_err; - unsigned long int tmp_ulong; + uintmax_t tmp; char *end; - s_err = xstrtoul (n_string, &end, 10, &tmp_ulong, - *n_string_end == 'b' ? "b" : NULL); - if (s_err == LONGINT_OK && tmp_ulong <= OFF_T_MAX) - *n_units = (off_t) tmp_ulong; + s_err = xstrtoumax (n_string, &end, 10, &tmp, + *n_string_end == 'b' ? "b" : NULL); + if (s_err == LONGINT_OK && tmp <= OFF_T_MAX) + *n_units = (off_t) tmp; else { /* Extract a NUL-terminated string for the error message. */ -- cgit v1.2.3-54-g00ecf