diff options
-rw-r--r-- | usr.sbin/quotaon/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/quotaon/quotaon.c | 18 | ||||
-rw-r--r-- | usr.sbin/repquota/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/repquota/repquota.c | 14 | ||||
-rw-r--r-- | usr.sbin/rmt/Makefile | 1 | ||||
-rw-r--r-- | 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 984008c..3f88bd9 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 <bsd.prog.mk> diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c index daec695..3e6ff45 100644 --- a/usr.sbin/quotaon/quotaon.c +++ b/usr.sbin/quotaon/quotaon.c @@ -62,24 +62,22 @@ static const char rcsid[] = #include <string.h> #include <unistd.h> -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 9b9a078..036fedf 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 <bsd.prog.mk> diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c index aadb784..b80b869 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 8a678b6..987f764 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 5315208..254c962 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 |