diff options
author | Jim Meyering <jim@meyering.net> | 2002-04-29 07:30:57 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-04-29 07:30:57 +0000 |
commit | 676991e63002085ae302e101129cc48f56148d3e (patch) | |
tree | 5ce3f83c036cb324a07cb7ec820f6e75b27560c2 /src | |
parent | f3959d84d3f4e173cf5052ed5a5fff1d79609761 (diff) | |
download | coreutils-676991e63002085ae302e101129cc48f56148d3e.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/tail.c | 10 |
1 files changed, 5 insertions, 5 deletions
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. */ |