diff options
author | des <des@FreeBSD.org> | 2001-06-24 12:38:28 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-06-24 12:38:28 +0000 |
commit | 2b2c653ce3eec218d3b09dc62a2c6eaca21eedc3 (patch) | |
tree | be3808cd2b320f0f37dd5813d65d8b7011985bf2 /usr.sbin/chkgrp | |
parent | 79a843a087e9d1c4c34af48ebbe21596febcb594 (diff) | |
download | FreeBSD-src-2b2c653ce3eec218d3b09dc62a2c6eaca21eedc3.zip FreeBSD-src-2b2c653ce3eec218d3b09dc62a2c6eaca21eedc3.tar.gz |
Constify, staticize and add a missing include; add WARNS?=2.
Submitted by: Mike Barcroft <mike@q9media.com>
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/chkgrp')
-rw-r--r-- | usr.sbin/chkgrp/Makefile | 1 | ||||
-rw-r--r-- | usr.sbin/chkgrp/chkgrp.c | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/chkgrp/Makefile b/usr.sbin/chkgrp/Makefile index a7bfc54..a1c3b5b 100644 --- a/usr.sbin/chkgrp/Makefile +++ b/usr.sbin/chkgrp/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ PROG= chkgrp +WARNS?= 2 MAN= chkgrp.8 .include <bsd.prog.mk> diff --git a/usr.sbin/chkgrp/chkgrp.c b/usr.sbin/chkgrp/chkgrp.c index 7d1af60..2f93109 100644 --- a/usr.sbin/chkgrp/chkgrp.c +++ b/usr.sbin/chkgrp/chkgrp.c @@ -34,10 +34,11 @@ static const char rcsid[] = #include <err.h> #include <ctype.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <sysexits.h> -void +static void usage(void) { fprintf(stderr, "usage: chkgrp [groupfile]\n"); @@ -47,9 +48,10 @@ usage(void) int main(int argc, char *argv[]) { - unsigned int len; - int n = 0, i, k, e = 0; - char *gfn, *line, *f[4], *p; + unsigned int i, len; + int n = 0, k, e = 0; + char *line, *f[4], *p; + const char *gfn; FILE *gf; /* check arguments */ |