From d8c965959fe157a40472eb54dbcc833dd4fa7ebd Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Thu, 11 Jul 2002 21:26:41 +0000 Subject: [PATCH] WARNS=4, de-__P() --- usr.sbin/quotaon/Makefile | 2 ++ usr.sbin/quotaon/quotaon.c | 18 ++++++++---------- usr.sbin/repquota/Makefile | 2 +- usr.sbin/repquota/repquota.c | 14 ++++++-------- usr.sbin/rmt/Makefile | 1 + usr.sbin/rmt/rmt.c | 26 ++++++++++++-------------- 6 files changed, 30 insertions(+), 33 deletions(-) diff --git a/usr.sbin/quotaon/Makefile b/usr.sbin/quotaon/Makefile index 984008cf8e8..3f88bd9da33 100644 --- a/usr.sbin/quotaon/Makefile +++ b/usr.sbin/quotaon/Makefile @@ -6,4 +6,6 @@ LINKS= ${BINDIR}/quotaon ${BINDIR}/quotaoff MAN= quotaon.8 MLINKS= quotaon.8 quotaoff.8 +WARNS?= 4 + .include diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c index daec695138c..3e6ff45fb0d 100644 --- a/usr.sbin/quotaon/quotaon.c +++ b/usr.sbin/quotaon/quotaon.c @@ -62,24 +62,22 @@ static const char rcsid[] = #include #include -char *qfname = QUOTAFILENAME; -char *qfextension[] = INITQFNAMES; +const char *qfname = QUOTAFILENAME; +const char *qfextension[] = INITQFNAMES; int aflag; /* all filesystems */ int gflag; /* operate on group quotas */ int uflag; /* operate on user quotas */ int vflag; /* verbose */ -int hasquota __P((struct fstab *, int, char **)); -int oneof __P((char *, char *[], int)); -int quotaonoff __P((struct fstab *fs, int, int, char *)); -int readonly __P((struct fstab *)); -static void usage __P((void)); +int hasquota(struct fstab *, int, char **); +int oneof(char *, char *[], int); +int quotaonoff(struct fstab *fs, int, int, char *); +int readonly(struct fstab *); +static void usage(void); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { register struct fstab *fs; char ch, *qfnp, *whoami; diff --git a/usr.sbin/repquota/Makefile b/usr.sbin/repquota/Makefile index 9b9a0786fed..036fedf8527 100644 --- a/usr.sbin/repquota/Makefile +++ b/usr.sbin/repquota/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= repquota -WARNS?= 2 +WARNS?= 4 MAN= repquota.8 .include diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c index aadb7843559..b80b8695830 100644 --- a/usr.sbin/repquota/repquota.c +++ b/usr.sbin/repquota/repquota.c @@ -97,16 +97,14 @@ u_long highid[MAXQUOTAS]; /* highest addid()'ed identifier per type */ int vflag; /* verbose */ int aflag; /* all filesystems */ -int hasquota __P((struct fstab *, int, char **)); -int oneof __P((char *, char *[], int)); -int repquota __P((struct fstab *, int, char *)); -char *timeprt __P((time_t)); -static void usage __P((void)); +int hasquota(struct fstab *, int, char **); +int oneof(char *, char *[], int); +int repquota(struct fstab *, int, char *); +char *timeprt(time_t); +static void usage(void); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { register struct fstab *fs; register struct passwd *pw; diff --git a/usr.sbin/rmt/Makefile b/usr.sbin/rmt/Makefile index 8a678b6fa8b..987f764e5ea 100644 --- a/usr.sbin/rmt/Makefile +++ b/usr.sbin/rmt/Makefile @@ -2,6 +2,7 @@ # $FreeBSD$ PROG= rmt +WARNS?= 4 MAN= rmt.8 # called from /usr/src/etc/Makefile diff --git a/usr.sbin/rmt/rmt.c b/usr.sbin/rmt/rmt.c index 5315208362d..254c9629104 100644 --- a/usr.sbin/rmt/rmt.c +++ b/usr.sbin/rmt/rmt.c @@ -75,14 +75,12 @@ FILE *debug; #define DEBUG1(f,a) if (debug) fprintf(debug, f, a) #define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2) -char *checkbuf __P((char *, int)); -void error __P((int)); -void getstring __P((char *)); +char *checkbuf(char *, int); +void error(int); +void getstring(char *); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int rval; char c; @@ -229,17 +227,17 @@ getstring(bp) } char * -checkbuf(record, size) - char *record; +checkbuf(rec, size) + char *rec; int size; { if (size <= maxrecsize) - return (record); - if (record != 0) - free(record); - record = malloc(size); - if (record == 0) { + return (rec); + if (rec != 0) + free(rec); + rec = malloc(size); + if (rec == 0) { DEBUG("rmtd: cannot allocate buffer space\n"); exit(4); } @@ -247,7 +245,7 @@ checkbuf(record, size) while (size > 1024 && setsockopt(0, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size)) < 0) size -= 1024; - return (record); + return (rec); } void