From 32471dd33a67355dad3d593827c7b350a939e81d Mon Sep 17 00:00:00 2001 From: bapt Date: Sat, 1 Aug 2015 08:35:20 +0000 Subject: Use strtoumax instead of strtoul --- usr.sbin/chkgrp/chkgrp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/chkgrp') diff --git a/usr.sbin/chkgrp/chkgrp.c b/usr.sbin/chkgrp/chkgrp.c index d7c1506..03758d1 100644 --- a/usr.sbin/chkgrp/chkgrp.c +++ b/usr.sbin/chkgrp/chkgrp.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -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); -- cgit v1.1