From 538cb7bb359af97fdaf09f86511a1d5f0663ca34 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Mon, 18 Apr 1983 20:10:52 -0800 Subject: [PATCH] lint from new lint library SCCS-vsn: sbin/restore/tape.c 3.11 --- usr/src/sbin/restore/tape.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/usr/src/sbin/restore/tape.c b/usr/src/sbin/restore/tape.c index ca70df8d67..c1b3beb8a1 100644 --- a/usr/src/sbin/restore/tape.c +++ b/usr/src/sbin/restore/tape.c @@ -1,7 +1,7 @@ /* Copyright (c) 1983 Regents of the University of California */ #ifndef lint -static char sccsid[] = "@(#)tape.c 3.11 (Berkeley) 83/04/17"; +static char sccsid[] = "@(#)tape.c 3.11 (Berkeley) 83/04/18"; #endif #include "restore.h" @@ -173,8 +173,11 @@ again: newvol = 0; while (newvol <= 0) { fprintf(stderr, "Specify next volume #: "); - if (gets(tbf) == NULL) - continue; + do { + (void) fgets(tbf, BUFSIZ, stdin); + } while (!feof(stdin) && tbf[0] == '\n'); + if (feof(stdin)) + done(1); newvol = atoi(tbf); if (newvol <= 0) { fprintf(stderr, @@ -249,7 +252,7 @@ setdumpnum() #ifdef RRESTOR rmtioctl(MTFSF, dumpnum - 1); #else - if (ioctl(mt, MTIOCTOP, &tcom) < 0) + if (ioctl(mt, (int)MTIOCTOP, (char *)&tcom) < 0) perror("ioctl MTFSF"); #endif } @@ -454,7 +457,7 @@ xtrlnkfile(buf, size) curfile.name, lnkbuf, buf, pathlen); done(1); } - strcat(lnkbuf, buf); + (void) strcat(lnkbuf, buf); } xtrlnkskip(buf, size) -- 2.20.1