- Remove unneeded header declaration of grp.h
- Remove unneeded (void) casts

Index: itime.c
===================================================================
RCS file: /cvs/src/sbin/dump/itime.c,v
retrieving revision 1.5
diff -u -u -r1.5 itime.c
--- itime.c	1 Nov 2003 17:15:58 -0000	1.5
+++ itime.c	29 Oct 2004 17:50:18 -0000
@@ -94,16 +94,16 @@
 			    strerror(errno));
 			return;
 		}
-		(void) fclose(df);
+		fclose(df);
 		if ((df = fopen(dumpdates, "r")) == NULL) {
 			quit("cannot read %s even after creating it: %s\n",
 			    dumpdates, strerror(errno));
 			/* NOTREACHED */
 		}
 	}
-	(void) flock(fileno(df), LOCK_SH);
+	flock(fileno(df), LOCK_SH);
 	readdumptimes(df);
-	(void) fclose(df);
+	fclose(df);
 }
 
 static void
@@ -178,7 +178,7 @@
 	if ((df = fopen(dumpdates, "r+")) == NULL)
 		quit("cannot rewrite %s: %s\n", dumpdates, strerror(errno));
 	fd = fileno(df);
-	(void) flock(fd, LOCK_EX);
+	flock(fd, LOCK_EX);
 	fname = disk;
 	free((char *)ddatev);
 	ddatev = 0;
@@ -204,7 +204,7 @@
 		(struct dumpdates *)calloc(1, sizeof (struct dumpdates));
 	nddates += 1;
   found:
-	(void) strncpy(dtwalk->dd_name, fname, sizeof (dtwalk->dd_name));
+	strncpy(dtwalk->dd_name, fname, sizeof (dtwalk->dd_name));
 	dtwalk->dd_level = level;
 	dtwalk->dd_ddate = spcl.c_date;
 
@@ -215,7 +215,7 @@
 		quit("%s: %s\n", dumpdates, strerror(errno));
 	if (ftruncate(fd, ftell(df)))
 		quit("ftruncate (%s): %s\n", dumpdates, strerror(errno));
-	(void) fclose(df);
+	fclose(df);
 	msg("level %c dump on %s", level,
 		spcl.c_date == 0 ? "the epoch\n" : ctime(&spcl.c_date));
 }
@@ -258,7 +258,7 @@
 {
 	char un_buf[128];
 
-	(void) sscanf(tbuf, DUMPINFMT, ddp->dd_name, &ddp->dd_level, un_buf);
+	sscanf(tbuf, DUMPINFMT, ddp->dd_name, &ddp->dd_level, un_buf);
 	ddp->dd_ddate = unctime(un_buf);
 	if (ddp->dd_ddate < 0)
 		return(-1);
Index: optr.c
===================================================================
RCS file: /cvs/src/sbin/dump/optr.c,v
retrieving revision 1.4
diff -u -u -r1.4 optr.c
--- optr.c	1 Nov 2003 17:15:58 -0000	1.4
+++ optr.c	29 Oct 2004 17:50:43 -0000
@@ -42,7 +42,6 @@
 
 #include <errno.h>
 #include <fstab.h>
-#include <grp.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -95,9 +94,9 @@
 		} else if (replybuffer[0] == 'n' || replybuffer[0] == 'N') {
 			back = 0;
 		} else {
-			(void) fprintf(stderr,
+			fprintf(stderr,
 			    "  DUMP: \"Yes\" or \"No\"?\n");
-			(void) fprintf(stderr,
+			fprintf(stderr,
 			    "  DUMP: %s: (\"yes\" or \"no\") ", question);
 		}
 	} while (back < 0);
@@ -105,10 +104,10 @@
 	/*
 	 *	Turn off the alarm, and reset the signal to trap out..
 	 */
-	(void) alarm(0);
+	alarm(0);
 	if (signal(SIGALRM, sig) == SIG_IGN)
 		signal(SIGALRM, SIG_IGN);
-	(void) fclose(mytty);
+	fclose(mytty);
 	return(back);
 }
 
@@ -123,7 +122,7 @@
 {
 	if (notify == 0) {
 		if (timeout == 0)
-			(void) fprintf(stderr,
+			fprintf(stderr,
 			    "  DUMP: %s: (\"yes\" or \"no\") ",
 			    attnmessage);
 		else
@@ -133,11 +132,11 @@
 			msgtail("\n");
 			broadcast("");		/* just print last msg */
 		}
-		(void) fprintf(stderr,"  DUMP: %s: (\"yes\" or \"no\") ",
+		fprintf(stderr,"  DUMP: %s: (\"yes\" or \"no\") ",
 		    attnmessage);
 	}
 	signal(SIGALRM, alarmcatch);
-	(void) alarm(120);
+	alarm(120);
 	timeout = 1;
 }
 
@@ -168,13 +167,13 @@
 	if ((fp = popen(buf, "w")) == NULL)
 		return;
 
-	(void) fputs("\a\a\aMessage from the dump program to all operators\n\nDUMP: NEEDS ATTENTION: ", fp);
+	fputs("\a\a\aMessage from the dump program to all operators\n\nDUMP: NEEDS ATTENTION: ", fp);
 	if (lastmsg[0])
-		(void) fputs(lastmsg, fp);
+		fputs(lastmsg, fp);
 	if (message[0])
-		(void) fputs(message, fp);
+		fputs(message, fp);
 
-	(void) pclose(fp);
+	pclose(fp);
 }
 
 /*
@@ -190,7 +189,7 @@
 	time_t	tnow;
 	int deltat, hours, mins;
 
-	(void) time(&tnow);
+	time(&tnow);
 	deltat = (blockswritten == 0) ? 0 : tstart_writing - tnow +
 	    (double)(tnow - tstart_writing) / blockswritten * tapesize;
 	percent = (blockswritten * 100.0) / tapesize;
@@ -222,15 +221,15 @@
 {
 	va_list ap;
 
-	(void) fprintf(stderr,"  DUMP: ");
+	fprintf(stderr,"  DUMP: ");
 #ifdef TDEBUG
-	(void) fprintf(stderr, "pid=%d ", getpid());
+	fprintf(stderr, "pid=%d ", getpid());
 #endif
 	va_start(ap, fmt);
-	(void) vfprintf(stderr, fmt, ap);
-	(void) fflush(stdout);
-	(void) fflush(stderr);
-	(void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap);
+	vfprintf(stderr, fmt, ap);
+	fflush(stdout);
+	fflush(stderr);
+	vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap);
 	va_end(ap);
 }
 
@@ -240,7 +239,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	(void) vfprintf(stderr, fmt, ap);
+	vfprintf(stderr, fmt, ap);
 	va_end(ap);
 }
 
@@ -249,15 +248,15 @@
 {
 	va_list ap;
 
-	(void) fprintf(stderr,"  DUMP: ");
+	fprintf(stderr,"  DUMP: ");
 #ifdef TDEBUG
-	(void) fprintf(stderr, "pid=%d ", getpid());
+	fprintf(stderr, "pid=%d ", getpid());
 #endif
 	va_start(ap, fmt);
-	(void) vfprintf(stderr, fmt, ap);
+	vfprintf(stderr, fmt, ap);
 	va_end(ap);
-	(void) fflush(stdout);
-	(void) fflush(stderr);
+	fflush(stdout);
+	fflush(stderr);
 	dumpabort(0);
 }
 
@@ -311,7 +310,7 @@
 		pf->pf_fstab = fs;
 		SLIST_INSERT_HEAD(&table, pf, pf_list);
 	}
-	(void) endfsent();
+	endfsent();
 }
 
 /*
@@ -363,15 +362,15 @@
 	time_t tnow;
 	struct tm *tlast;
 
-	(void) time(&tnow);
+	time(&tnow);
 	getfstab();		/* /etc/fstab input */
 	initdumptimes();	/* /etc/dumpdates input */
 	qsort((char *) ddatev, nddates, sizeof(struct dumpdates *), datesort);
 
 	if (arg == 'w')
-		(void) printf("Dump these file systems:\n");
+		printf("Dump these file systems:\n");
 	else
-		(void) printf("Last dump(s) done (Dump '>' file systems):\n");
+		printf("Last dump(s) done (Dump '>' file systems):\n");
 	lastname = "??";
 	ITITERATE(i, dtwalk) {
 		if (strncmp(lastname, dtwalk->dd_name,
@@ -389,7 +388,7 @@
 				     + (dt->fs_freq * 86400));
 		};
 		if (arg != 'w' || dumpme)
-			(void) printf(
+			printf(
 			    "%c %8s\t(%6s) Last dump: Level %c, Date %s\n",
 			    dumpme && (arg != 'w') ? '>' : ' ',
 			    dtwalk->dd_name,
Index: tape.c
===================================================================
RCS file: /cvs/src/sbin/dump/tape.c,v
retrieving revision 1.6
diff -u -u -r1.6 tape.c
--- tape.c	4 Feb 2004 17:39:59 -0000	1.6
+++ tape.c	29 Oct 2004 17:51:02 -0000
@@ -337,7 +337,7 @@
 				quit("or use no size estimate at all.\n");
 			}
 		}
-		(void) close(slaves[f].fd);
+		close(slaves[f].fd);
 	}
 	while (wait((int *)NULL) >= 0)	/* wait for any signals from slaves */
 		/* void */;
@@ -360,10 +360,10 @@
 		(void)close(tapefd);
 		return;
 	}
-	(void) close(tapefd);
+	close(tapefd);
 	while ((f = open(tape, 0)) < 0)
 		sleep (10);
-	(void) close(f);
+	close(f);
 }
 
 void
@@ -646,7 +646,7 @@
 
 	if (master != 0 && master != getpid())
 		/* Signals master to call dumpabort */
-		(void) kill(master, SIGTERM);
+		kill(master, SIGTERM);
 	else {
 		killall();
 		msg("The ENTIRE dump is aborted.\n");
@@ -708,7 +708,7 @@
 		slaves[i].sent = 0;
 		if (slaves[i].pid == 0) { 	    /* Slave starts up here */
 			for (j = 0; j <= i; j++)
-			        (void) close(slaves[j].fd);
+			        close(slaves[j].fd);
 			signal(SIGINT, SIG_IGN);    /* Master handles this */
 			doslave(cmd[0], i);
 			Exit(X_FINOK);
@@ -716,7 +716,7 @@
 	}
 
 	for (i = 0; i < SLAVES; i++)
-		(void) atomic(write, slaves[i].fd,
+		atomic(write, slaves[i].fd,
 			      (char *) &slaves[(i + 1) % SLAVES].pid,
 		              sizeof slaves[0].pid);
 
@@ -730,7 +730,7 @@
 
 	for (i = 0; i < SLAVES; i++)
 		if (slaves[i].pid > 0) {
-			(void) kill(slaves[i].pid, SIGKILL);
+			kill(slaves[i].pid, SIGKILL);
 			slaves[i].sent = 0;
 		}
 }
@@ -751,7 +751,7 @@
 	/*
 	 * Need our own seek pointer.
 	 */
-	(void) close(diskfd);
+	close(diskfd);
 	if ((diskfd = open(disk, O_RDONLY)) < 0)
 		quit("slave couldn't reopen disk: %s\n", strerror(errno));
 
@@ -784,7 +784,7 @@
 		if (setjmp(jmpbuf) == 0) {
 			ready = 1;
 			if (!caught)
-				(void) pause();
+				pause();
 		}
 		ready = 0;
 		caught = 0;
@@ -830,22 +830,22 @@
 			size = 0;
 
 		if (wrote < 0) {
-			(void) kill(master, SIGUSR1);
+			kill(master, SIGUSR1);
 			for (;;)
-				(void) sigpause(0);
+				sigpause(0);
 		} else {
 			/*
 			 * pass size of write back to master
 			 * (for EOT handling)
 			 */
-			(void) atomic(write, cmd, (char *)&size, sizeof size);
+			atomic(write, cmd, (char *)&size, sizeof size);
 		}
 
 		/*
 		 * If partial write, don't want next slave to go.
 		 * Also jolts him awake.
 		 */
-		(void) kill(nextslave, SIGUSR2);
+		kill(nextslave, SIGUSR2);
 	}
 	if (nread != 0)
 		quit("error reading command pipe: %s\n", strerror(errno));
