diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-08-01 08:35:20 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-08-01 08:35:20 +0000 |
commit | e622418c5bee0970d278fa667bae4dbf1e91cda0 (patch) | |
tree | 4ba9f1ef8e14fbd2682e58acb5ea3745fb5eed2f /usr.sbin/chkgrp/chkgrp.c | |
parent | f52c3dd41595ae691afa68a2689918b690e11c56 (diff) |
Use strtoumax instead of strtoul
Notes
Notes:
svn path=/head/; revision=286148
Diffstat (limited to 'usr.sbin/chkgrp/chkgrp.c')
-rw-r--r-- | usr.sbin/chkgrp/chkgrp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/chkgrp/chkgrp.c b/usr.sbin/chkgrp/chkgrp.c index d7c15067102e..03758d138de9 100644 --- a/usr.sbin/chkgrp/chkgrp.c +++ b/usr.sbin/chkgrp/chkgrp.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include <err.h> #include <errno.h> #include <ctype.h> +#include <inttypes.h> #include <limits.h> #include <stdint.h> #include <stdio.h> @@ -169,9 +170,9 @@ main(int argc, char *argv[]) /* check the range of the group id */ errno = 0; - gid = strtoul(f[2], NULL, 10); + gid = strtoumax(f[2], NULL, 10); if (errno != 0) { - warnx("%s: line %d: strtoul failed", gfn, n); + warnx("%s: line %d: strtoumax failed", gfn, n); } else if (gid > GID_MAX) { warnx("%s: line %d: group id is too large (%ju > %ju)", gfn, n, (uintmax_t)gid, (uintmax_t)GID_MAX); |