diff options
Diffstat (limited to 'usr.sbin/rmt')
-rw-r--r-- | usr.sbin/rmt/Makefile | 1 | ||||
-rw-r--r-- | usr.sbin/rmt/rmt.c | 26 |
2 files changed, 13 insertions, 14 deletions
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 |