Clean (void) casts from sbin
authorSascha Wildner <swildner@dragonflybsd.org>
Sat, 18 Dec 2004 21:43:46 +0000 (21:43 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Sat, 18 Dec 2004 21:43:46 +0000 (21:43 +0000)
88 files changed:
sbin/adjkerntz/adjkerntz.c
sbin/atm/atm/atm.c
sbin/atm/atm/atm_set.c
sbin/atm/fore_dnld/fore_dnld.c
sbin/atm/ilmid/ilmid.c
sbin/ccdconfig/ccdconfig.c
sbin/clri/clri.c
sbin/disklabel/disklabel.c
sbin/dmesg/dmesg.c
sbin/dump/dumprmt.c
sbin/dump/itime.c
sbin/dump/main.c
sbin/dump/optr.c
sbin/dump/tape.c
sbin/dumpfs/dumpfs.c
sbin/fsck/dir.c
sbin/fsck/fsutil.c
sbin/fsck/inode.c
sbin/fsck/main.c
sbin/fsck/pass1.c
sbin/fsck/pass2.c
sbin/fsck/preen.c
sbin/fsck/utilities.c
sbin/fsck_msdosfs/dir.c
sbin/fsirand/fsirand.c
sbin/i386/fdisk/fdisk.c
sbin/ifconfig/ifconfig.c
sbin/ifconfig/ifieee80211.c
sbin/ifconfig/ifmedia.c
sbin/init/init.c
sbin/ip6fw/ip6fw.c
sbin/ipfw/ipfw.c
sbin/ipfw/ipfw2.c
sbin/mknod/mknod.c
sbin/mount/mount.c
sbin/mount/mount_ufs.c
sbin/mount_cd9660/mount_cd9660.c
sbin/mount_ext2fs/mount_ext2fs.c
sbin/mount_hpfs/mount_hpfs.c
sbin/mount_msdos/mount_msdos.c
sbin/mount_nfs/mount_nfs.c
sbin/mount_ntfs/mount_ntfs.c
sbin/mount_null/mount_null.c
sbin/mount_portal/activate.c
sbin/mount_portal/conf.c
sbin/mount_portal/mount_portal.c
sbin/mount_portal/pt_file.c
sbin/mount_portal/pt_tcp.c
sbin/mount_portal/pt_tcplisten.c
sbin/mount_std/mount_std.c
sbin/mount_udf/mount_udf.c
sbin/mount_umap/mount_umap.c
sbin/mount_union/mount_union.c
sbin/natd/natd.c
sbin/newfs/mkfs.c
sbin/newfs/newfs.c
sbin/nfsd/nfsd.c
sbin/nos-tun/nos-tun.c
sbin/pc98/fdisk/fdisk.c
sbin/ping/ping.c
sbin/ping6/ping6.c
sbin/quotacheck/quotacheck.c
sbin/rcorder/hash.c
sbin/reboot/reboot.c
sbin/restore/dirs.c
sbin/restore/interactive.c
sbin/restore/main.c
sbin/restore/restore.c
sbin/restore/symtab.c
sbin/restore/tape.c
sbin/restore/utilities.c
sbin/routed/if.c
sbin/routed/input.c
sbin/routed/main.c
sbin/routed/output.c
sbin/routed/parms.c
sbin/routed/rdisc.c
sbin/routed/rtquery/rtquery.c
sbin/routed/table.c
sbin/routed/trace.c
sbin/savecore/savecore.c
sbin/shutdown/shutdown.c
sbin/slattach/slattach.c
sbin/startslip/startslip.c
sbin/sysctl/pathconf.c
sbin/sysctl/sysctl.c
sbin/tunefs/tunefs.c
sbin/umount/umount.c

index 3d07f41..29e5800 100644 (file)
@@ -25,7 +25,7 @@
  *
  * @(#)Copyright (C) 1993-1996 by Andrey A. Chernov, Moscow, Russia. All rights reserved.
  * $FreeBSD: src/sbin/adjkerntz/adjkerntz.c,v 1.25.2.1 2001/07/30 10:38:04 dd Exp $
- * $DragonFly: src/sbin/adjkerntz/adjkerntz.c,v 1.4 2003/11/01 17:15:57 drhodus Exp $
+ * $DragonFly: src/sbin/adjkerntz/adjkerntz.c,v 1.5 2004/12/18 21:43:38 swildner Exp $
  */
 
 /*
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
 
        openlog("adjkerntz", LOG_PID|LOG_PERROR, LOG_DAEMON);
 
-       (void) signal(SIGHUP, SIG_IGN);
+       signal(SIGHUP, SIG_IGN);
 
        if (init && daemon(0, 1)) {
                syslog(LOG_ERR, "daemon: %m");
@@ -126,8 +126,8 @@ int main(int argc, char **argv)
        }
 
 again:
-       (void) sigprocmask(SIG_BLOCK, &mask, NULL);
-       (void) signal(SIGTERM, fake);
+       sigprocmask(SIG_BLOCK, &mask, NULL);
+       signal(SIGTERM, fake);
 
        diff = 0;
        stv = NULL;
@@ -185,9 +185,9 @@ recalculate:
                        "Warning: nonexistent local time.");
                syslog(LOG_WARNING, "Will retry after %d minutes.",
                        REPORT_PERIOD / 60);
-               (void) signal(SIGTERM, SIG_DFL);
-               (void) sigprocmask(SIG_UNBLOCK, &mask, NULL);
-               (void) sleep(REPORT_PERIOD);
+               signal(SIGTERM, SIG_DFL);
+               sigprocmask(SIG_UNBLOCK, &mask, NULL);
+               sleep(REPORT_PERIOD);
                goto again;
        }
        offset = -local.tm_gmtoff;
@@ -237,9 +237,9 @@ recalculate:
                                "Warning: nonexistent final local time.");
                        syslog(LOG_WARNING, "Will retry after %d minutes.",
                                REPORT_PERIOD / 60);
-                       (void) signal(SIGTERM, SIG_DFL);
-                       (void) sigprocmask(SIG_UNBLOCK, &mask, NULL);
-                       (void) sleep(REPORT_PERIOD);
+                       signal(SIGTERM, SIG_DFL);
+                       sigprocmask(SIG_UNBLOCK, &mask, NULL);
+                       sleep(REPORT_PERIOD);
                        goto again;
                }
                offset = -local.tm_gmtoff;
@@ -358,7 +358,7 @@ recalculate:
        if (init && wall_clock) {
                sleep_mode = False;
                /* wait for signals and acts like -a */
-               (void) sigsuspend(&emask);
+               sigsuspend(&emask);
                goto again;
        }
 
index 67143c3..3ee65e7 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/sbin/atm/atm/atm.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm.c,v 1.3 2003/09/28 14:39:16 hmp Exp $
+ *     @(#) $DragonFly: src/sbin/atm/atm/atm.c,v 1.4 2004/12/18 21:43:38 swildner Exp $
  */
 
 /*
@@ -432,7 +432,7 @@ attach(int argc, char **argv, struct cmd *cmdp)
                }
                exit(1);
        }
-       (void)close(s);
+       close(s);
 }
 
 
@@ -497,7 +497,7 @@ detach(int argc, char **argv, struct cmd *cmdp)
                }
                exit(1);
        }
-       (void)close(s);
+       close(s);
 }
 
 
@@ -679,7 +679,7 @@ pvc_add(int argc, char **argv, struct cmd *cmdp)
                }
                exit(1);
        }
-       (void)close(s);
+       close(s);
 }
 
 
@@ -785,7 +785,7 @@ arp_add(int argc, char **argv, struct cmd *cmdp)
                }
                exit(1);
        }
-       (void)close(s);
+       close(s);
 }
 
 
@@ -934,7 +934,7 @@ vcc_dlt(int argc, char **argv, struct cmd *cmdp, struct atmdelreq *apr)
                }
                exit(1);
        }
-       (void)close(s);
+       close(s);
 }
 
 
@@ -1010,7 +1010,7 @@ arp_dlt(int argc, char **argv, struct cmd *cmdp)
                }
                exit(1);
        }
-       (void)close(s);
+       close(s);
 }
 
 
index 830ee4f..c6f482f 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/sbin/atm/atm/atm_set.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm_set.c,v 1.3 2003/09/28 14:39:16 hmp Exp $
+ *     @(#) $DragonFly: src/sbin/atm/atm/atm_set.c,v 1.4 2004/12/18 21:43:38 swildner Exp $
  */
 
 /*
@@ -248,7 +248,7 @@ set_arpserver(int argc, char **argv, struct cmd *cmdp)
                exit(1);
        }
 
-       (void)close(s);
+       close(s);
 }
 
 
@@ -341,7 +341,7 @@ set_macaddr(int argc, char **argv, struct cmd *cmdp)
                exit(1);
        }
 
-       (void)close(s);
+       close(s);
 }
 
 
@@ -426,7 +426,7 @@ set_netif(int argc, char **argv, struct cmd *cmdp)
                perror("ioctl (AIOCSET) set NIF");
                exit(1);
        }
-       (void)close(s);
+       close(s);
 }
 
 
@@ -519,5 +519,5 @@ set_prefix(int argc, char **argv, struct cmd *cmdp)
                exit(1);
        }
 
-       (void)close(s);
+       close(s);
 }
index 3cf94cb..9a0043e 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/sbin/atm/fore_dnld/fore_dnld.c,v 1.6.2.2 2000/12/11 01:03:24 obrien Exp $
- *     @(#) $DragonFly: src/sbin/atm/fore_dnld/fore_dnld.c,v 1.5 2004/02/04 17:39:58 joerg Exp $
+ *     @(#) $DragonFly: src/sbin/atm/fore_dnld/fore_dnld.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 /*
@@ -1069,7 +1069,7 @@ main( int argc, char **argv )
                                perror ( "mmap ram" );
                                fprintf(stderr, "%s download failed\n",
                                        air->acp_intf);
-                               (void) close(fd);
+                               close(fd);
                                continue;
                        }
                        Mon = (Mon960 *)(ram + MON960_BASE);
@@ -1097,7 +1097,7 @@ main( int argc, char **argv )
                                default:
                                        fprintf(stderr, "%s unknown status\n",
                                                air->acp_intf);
-                                       (void) close(fd);
+                                       close(fd);
                                        continue;
                                }
                                break;
@@ -1183,7 +1183,7 @@ main( int argc, char **argv )
                                fprintf ( stderr, 
                                "%s is up and running - no download allowed.\n",
                                        air->acp_intf );
-                               (void) close(fd);
+                               close(fd);
                                continue;
                            }
                
@@ -1192,7 +1192,7 @@ main( int argc, char **argv )
                                fprintf ( stderr, 
                                        "%s is not ready for downloading.\n", 
                                        air->acp_intf );
-                               (void) close(fd);
+                               close(fd);
                                continue;
                            }
                
@@ -1300,7 +1300,7 @@ main( int argc, char **argv )
                            if ( err ) {
                                fprintf(stderr, "%s download failed\n",
                                        air->acp_intf);
-                               (void) close(fd);
+                               close(fd);
                                continue;
                            }
 
index 68746ef..ae78b58 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *      @(#) $FreeBSD: src/sbin/atm/ilmid/ilmid.c,v 1.6.2.2 2001/03/04 07:15:30 kris Exp $
- *      @(#) $DragonFly: src/sbin/atm/ilmid/ilmid.c,v 1.5 2003/11/03 19:51:04 eirikn Exp $
+ *      @(#) $DragonFly: src/sbin/atm/ilmid/ilmid.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 /*
@@ -960,7 +960,7 @@ asn_get_header ( bufp )
         */
        if ( h->pdutype != PDU_TYPE_TRAP ) {    /* TRAP uses different format */
 
-               (void) asn_get_pdu_len ( &bp, &dummy );
+               asn_get_pdu_len ( &bp, &dummy );
 
                /* Request ID */
                if ( *bp++ != ASN_INTEGER ) {
@@ -1119,7 +1119,7 @@ get_ticks()
        struct timeval  timenow;
        struct timeval  timediff;
 
-       (void) gettimeofday ( &timenow, NULL );
+       gettimeofday ( &timenow, NULL );
        /*
         * Adjust for subtraction
         */
@@ -1235,7 +1235,7 @@ build_pdu ( hdr, type )
 
                /* Fill in ENTERPRISE OBJID */
                *bp++ = ASN_OBJID;
-               (void) asn_put_objid ( &bp, &hdr->enterprise );
+               asn_put_objid ( &bp, &hdr->enterprise );
 
                /* Fill in IP address */
                *bp++ = ASN_IPADDR;
@@ -2488,7 +2488,7 @@ main ( argc, argv )
        /*
         * Get our startup time
         */
-       (void) gettimeofday ( &starttime, NULL );
+       gettimeofday ( &starttime, NULL );
        starttime.tv_sec--;
        starttime.tv_usec += 1000000;
 
index e89c04f..a77e64b 100644 (file)
@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/ccdconfig/ccdconfig.c,v 1.16.2.2 2000/12/11 01:03:25 obrien Exp $
- * $DragonFly: src/sbin/ccdconfig/ccdconfig.c,v 1.4 2003/11/01 17:15:57 drhodus Exp $
+ * $DragonFly: src/sbin/ccdconfig/ccdconfig.c,v 1.5 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -370,7 +370,7 @@ do_all(int action)
                        free(argv);
        }
 
-       (void)fclose(f);
+       fclose(f);
        return (rval);
 }
 
@@ -433,9 +433,9 @@ resolve_ccdname(char *name)
                        free(path);
                        return (NULL);
                }
-               (void)sprintf(path, "%s%s%c", _PATH_DEV, name, 'a' + rawpart);
+               sprintf(path, "%s%s%c", _PATH_DEV, name, 'a' + rawpart);
        } else
-               (void)sprintf(path, "%s%s", _PATH_DEV, name);
+               sprintf(path, "%s%s", _PATH_DEV, name);
 
        return (path);
 }
@@ -472,7 +472,7 @@ do_io(char *path, u_long cmd, struct ccd_ioctl *cciop)
 }
 
 #define KVM_ABORT(kd, str) {                                           \
-       (void)kvm_close((kd));                                          \
+       kvm_close((kd));                                                \
        warnx("%s", (str));                                                     \
        warnx("%s", kvm_geterr((kd)));                                  \
        return (1);                                                     \
@@ -564,11 +564,11 @@ dump_ccd(int argc, char **argv)
        free(cs);
 
  done:
-       (void)kvm_close(kd);
+       kvm_close(kd);
        return (0);
 
  bad:
-       (void)kvm_close(kd);
+       kvm_close(kd);
        return (1);
 }
 
index fc4dfbf..1bfedb5 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1990, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)clri.c  8.2 (Berkeley) 9/23/93
  * $FreeBSD: src/sbin/clri/clri.c,v 1.4 1999/08/28 00:12:32 peter Exp $
- * $DragonFly: src/sbin/clri/clri.c,v 1.4 2003/09/28 14:39:16 hmp Exp $
+ * $DragonFly: src/sbin/clri/clri.c,v 1.5 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -54,7 +54,7 @@
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: clri filesystem inode ...\n");
+       fprintf(stderr, "usage: clri filesystem inode ...\n");
        exit(1);
 }
 
@@ -94,7 +94,7 @@ main(int argc, char **argv)
                /* get the inode number. */
                if ((inonum = atoi(*argv)) <= 0)
                        errx(1, "%s is not a valid inode number", *argv);
-               (void)printf("clearing %d\n", inonum);
+               printf("clearing %d\n", inonum);
 
                /* read in the appropriate block. */
                offset = ino_to_fsba(sbp, inonum);      /* inode to fs blk */
@@ -120,8 +120,8 @@ main(int argc, char **argv)
                        err(1, "%s", fs);
                if (write(fd, ibuf, bsize) != bsize)
                        err(1, "%s", fs);
-               (void)fsync(fd);
+               fsync(fd);
        }
-       (void)close(fd);
+       close(fd);
        exit(0);
 }
index 7a29d2b..8c60ba6 100644 (file)
@@ -37,7 +37,7 @@
  * @(#)disklabel.c     1.2 (Symmetric) 11/28/85
  * @(#)disklabel.c      8.2 (Berkeley) 1/7/94
  * $FreeBSD: src/sbin/disklabel/disklabel.c,v 1.28.2.15 2003/01/24 16:18:16 des Exp $
- * $DragonFly: src/sbin/disklabel/disklabel.c,v 1.6 2004/08/30 19:27:21 eirikn Exp $
+ * $DragonFly: src/sbin/disklabel/disklabel.c,v 1.7 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -235,14 +235,14 @@ main(int argc, char *argv[])
 
        dkname = argv[0];
        if (dkname[0] != '/') {
-               (void)sprintf(np, "%s%s%c", _PATH_DEV, dkname, 'a' + RAW_PART);
+               sprintf(np, "%s%s%c", _PATH_DEV, dkname, 'a' + RAW_PART);
                specname = np;
                np += strlen(specname) + 1;
        } else
                specname = dkname;
        f = open(specname, op == READ ? O_RDONLY : O_RDWR);
        if (f < 0 && errno == ENOENT && dkname[0] != '/') {
-               (void)sprintf(specname, "%s%s", _PATH_DEV, dkname);
+               sprintf(specname, "%s%s", _PATH_DEV, dkname);
                np = namebuf + strlen(specname) + 1;
                f = open(specname, op == READ ? O_RDONLY : O_RDWR);
        }
@@ -370,19 +370,17 @@ makelabel(const char *type, const char *name, struct disklabel *lp)
         */
        if (!xxboot && lp->d_boot0) {
                if (*lp->d_boot0 != '/')
-                       (void)sprintf(boot0, "%s/%s",
-                                     _PATH_BOOTDIR, lp->d_boot0);
+                       sprintf(boot0, "%s/%s", _PATH_BOOTDIR, lp->d_boot0);
                else
-                       (void)strcpy(boot0, lp->d_boot0);
+                       strcpy(boot0, lp->d_boot0);
                xxboot = boot0;
        }
 #if NUMBOOT > 1
        if (!bootxx && lp->d_boot1) {
                if (*lp->d_boot1 != '/')
-                       (void)sprintf(boot1, "%s/%s",
-                                     _PATH_BOOTDIR, lp->d_boot1);
+                       sprintf(boot1, "%s/%s", _PATH_BOOTDIR, lp->d_boot1);
                else
-                       (void)strcpy(boot1, lp->d_boot1);
+                       strcpy(boot1, lp->d_boot1);
                bootxx = boot1;
        }
 #endif
@@ -390,7 +388,7 @@ makelabel(const char *type, const char *name, struct disklabel *lp)
        /* d_packname is union d_boot[01], so zero */
        bzero(lp->d_packname, sizeof(lp->d_packname));
        if (name)
-               (void)strncpy(lp->d_packname, name, sizeof(lp->d_packname));
+               strncpy(lp->d_packname, name, sizeof(lp->d_packname));
 }
 
 int
@@ -432,7 +430,7 @@ writelabel(int f, const char *boot, struct disklabel *lp)
                                l_perror("ioctl DIOCSDINFO");
                                return (1);
                        }
-                       (void)lseek(f, (off_t)0, SEEK_SET);
+                       lseek(f, (off_t)0, SEEK_SET);
                        
 #ifdef __alpha__
                        /*
@@ -464,7 +462,7 @@ writelabel(int f, const char *boot, struct disklabel *lp)
                        }
 #endif
                        flag = 0;
-                       (void) ioctl(f, DIOCWLABEL, &flag);
+                       ioctl(f, DIOCWLABEL, &flag);
                } else if (ioctl(f, DIOCWDINFO, lp) < 0) {
                        l_perror("ioctl DIOCWDINFO");
                        return (1);
@@ -475,8 +473,8 @@ writelabel(int f, const char *boot, struct disklabel *lp)
                        
                        alt = lp->d_ncylinders * lp->d_secpercyl - lp->d_nsectors;
                        for (i = 1; i < 11 && i < lp->d_nsectors; i += 2) {
-                               (void)lseek(f, (off_t)((alt + i) * lp->d_secsize),
-                                                       SEEK_SET);
+                               lseek(f, (off_t)((alt + i) * lp->d_secsize),
+                                     SEEK_SET);
                                if (write(f, boot, lp->d_secsize) < lp->d_secsize)
                                        warn("alternate label %d write", i/2);
                        }
@@ -607,12 +605,12 @@ makebootarea(char *boot, struct disklabel *dp, int f)
                *np++ = '\0';
 
                if (!xxboot) {
-                       (void)sprintf(boot0, "%s/boot1", _PATH_BOOTDIR);
+                       sprintf(boot0, "%s/boot1", _PATH_BOOTDIR);
                        xxboot = boot0;
                }
 #if NUMBOOT > 1
                if (!bootxx) {
-                       (void)sprintf(boot1, "%s/boot2", _PATH_BOOTDIR);
+                       sprintf(boot1, "%s/boot2", _PATH_BOOTDIR);
                        bootxx = boot1;
                }
 #endif
@@ -651,7 +649,7 @@ makebootarea(char *boot, struct disklabel *dp, int f)
 #endif /* i386 */
        if (read(b, boot, (int)dp->d_secsize) < 0)
                err(4, "%s", xxboot);
-       (void)close(b);
+       close(b);
 #ifdef __i386__
        for (i = DOSPARTOFF, found = 0;
             !found && i < DOSPARTOFF + NDOSPART*sizeof(struct dos_partition);
@@ -707,7 +705,7 @@ makebootarea(char *boot, struct disklabel *dp, int f)
                }
        }
 #endif /* NUMBOOT > 1 */
-       (void)close(b);
+       close(b);
 #endif /* NUMBOOT > 0 */
        /*
         * Make sure no part of the bootstrap is written in the area
@@ -847,7 +845,7 @@ edit(struct disklabel *lp, int f)
                        *lp = label;
                        if (writelabel(f, bootarea, lp) == 0) {
                                fclose(fp);
-                               (void) unlink(tmpfil);
+                               unlink(tmpfil);
                                return (0);
                        }
                }
@@ -860,7 +858,7 @@ edit(struct disklabel *lp, int f)
                if  (c == (int)'n')
                        break;
        }
-       (void) unlink(tmpfil);
+       unlink(tmpfil);
        return (1);
 }
 
@@ -1577,7 +1575,7 @@ getvirginlabel(void)
                warnx("\"auto\" requires the usage of a canonical disk name");
                return (NULL);
        }
-       (void)snprintf(namebuf, BBSIZE, "%s%s", _PATH_DEV, dkname);
+       snprintf(namebuf, BBSIZE, "%s%s", _PATH_DEV, dkname);
        if ((f = open(namebuf, O_RDONLY)) == -1) {
                warn("cannot open %s", namebuf);
                return (NULL);
index f5f15ab..9cc0ed3 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1991, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)dmesg.c 8.1 (Berkeley) 6/5/93
  * $FreeBSD: src/sbin/dmesg/dmesg.c,v 1.11.2.3 2001/08/08 22:32:15 obrien Exp $
- * $DragonFly: src/sbin/dmesg/dmesg.c,v 1.5 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/dmesg/dmesg.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -75,7 +75,7 @@ main(int argc, char **argv)
        size_t buflen;
        int bufpos;
 
-       (void) setlocale(LC_CTYPE, "");
+       setlocale(LC_CTYPE, "");
        memf = nlistf = NULL;
        while ((ch = getopt(argc, argv, "aM:N:")) != -1)
                switch(ch) {
@@ -169,20 +169,20 @@ main(int argc, char **argv)
                if (ch == '\0')
                        continue;
                newl = ch == '\n';
-               (void)vis(buf, ch, 0, 0);
+               vis(buf, ch, 0, 0);
                if (buf[1] == 0)
-                       (void)putchar(buf[0]);
+                       putchar(buf[0]);
                else
-                       (void)printf("%s", buf);
+                       printf("%s", buf);
        } while (++p != ep);
        if (!newl)
-               (void)putchar('\n');
+               putchar('\n');
        exit(0);
 }
 
 void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: dmesg [-a] [-M core] [-N system]\n");
+       fprintf(stderr, "usage: dmesg [-a] [-M core] [-N system]\n");
        exit(1);
 }
index ee2d713..b7b2d47 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)dumprmt.c       8.3 (Berkeley) 4/28/95
  * $FreeBSD: src/sbin/dump/dumprmt.c,v 1.14.2.1 2000/07/01 06:31:52 ps Exp $
- * $DragonFly: src/sbin/dump/dumprmt.c,v 1.5 2003/11/01 17:15:58 drhodus Exp $
+ * $DragonFly: src/sbin/dump/dumprmt.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -181,7 +181,7 @@ rmtgetconn(void)
                msg("login to %s as %s failed.\n", rmtpeer, tuser);
                return;
        }
-       (void)fprintf(stderr, "Connection to %s established.\n", rmtpeer);
+       fprintf(stderr, "Connection to %s established.\n", rmtpeer);
        size = ntrec * TP_BSIZE;
        if (size > 60 * 1024)           /* XXX */
                size = 60 * 1024;
@@ -190,7 +190,7 @@ rmtgetconn(void)
        while (size > TP_BSIZE &&
            setsockopt(rmtape, SOL_SOCKET, SO_SNDBUF, &size, sizeof (size)) < 0)
                    size -= TP_BSIZE;
-       (void)setsockopt(rmtape, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size));
+       setsockopt(rmtape, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size));
        throughput = IPTOS_THROUGHPUT;
        if (setsockopt(rmtape, IPPROTO_IP, IP_TOS,
            &throughput, sizeof(throughput)) < 0)
@@ -221,7 +221,7 @@ rmtopen(char *tape, int mode)
 {
        char buf[256];
 
-       (void)snprintf(buf, sizeof (buf), "O%.226s\n%d\n", tape, mode);
+       snprintf(buf, sizeof (buf), "O%.226s\n%d\n", tape, mode);
        rmtstate = TS_OPEN;
        return (rmtcall(tape, buf));
 }
@@ -242,7 +242,7 @@ rmtread(char *buf, int count)
        char line[30];
        int n, i, cc;
 
-       (void)snprintf(line, sizeof (line), "R%d\n", count);
+       snprintf(line, sizeof (line), "R%d\n", count);
        n = rmtcall("read", line);
        if (n < 0)
                /* rmtcall() properly sets errno for us on errors. */
@@ -260,7 +260,7 @@ rmtwrite(char *buf, int count)
 {
        char line[30];
 
-       (void)snprintf(line, sizeof (line), "W%d\n", count);
+       snprintf(line, sizeof (line), "W%d\n", count);
        write(rmtape, line, strlen(line));
        write(rmtape, buf, count);
        return (rmtreply("write"));
@@ -271,7 +271,7 @@ rmtwrite0(int count)
 {
        char line[30];
 
-       (void)snprintf(line, sizeof (line), "W%d\n", count);
+       snprintf(line, sizeof (line), "W%d\n", count);
        write(rmtape, line, strlen(line));
 }
 
@@ -294,7 +294,7 @@ rmtseek(int offset, int pos)
 {
        char line[80];
 
-       (void)snprintf(line, sizeof (line), "L%d\n%d\n", offset, pos);
+       snprintf(line, sizeof (line), "L%d\n%d\n", offset, pos);
        return (rmtcall("seek", line));
 }
 
@@ -321,7 +321,7 @@ rmtioctl(int cmd, int count)
 
        if (count < 0)
                return (-1);
-       (void)snprintf(buf, sizeof (buf), "I%d\n%d\n", cmd, count);
+       snprintf(buf, sizeof (buf), "I%d\n%d\n", cmd, count);
        return (rmtcall("ioctl", buf));
 }
 
index d592d6e..6b5c94f 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)itime.c 8.1 (Berkeley) 6/5/93
  * $FreeBSD: src/sbin/dump/itime.c,v 1.3.2.1 2001/08/01 06:29:35 obrien Exp $
- * $DragonFly: src/sbin/dump/itime.c,v 1.5 2003/11/01 17:15:58 drhodus Exp $
+ * $DragonFly: src/sbin/dump/itime.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -94,16 +94,16 @@ initdumptimes(void)
                            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 @@ putdumptime(void)
        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 @@ putdumptime(void)
                (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 @@ putdumptime(void)
                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 @@ makedumpdate(struct dumpdates *ddp, char *tbuf)
 {
        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 7d9fbfa..6ac9761 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1980, 1991, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)main.c  8.6 (Berkeley) 5/1/95
  * $FreeBSD: src/sbin/dump/main.c,v 1.20.2.9 2003/01/25 18:54:59 dillon Exp $
- * $DragonFly: src/sbin/dump/main.c,v 1.7 2004/08/30 19:27:21 eirikn Exp $
+ * $DragonFly: src/sbin/dump/main.c,v 1.8 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -99,7 +99,7 @@ main(int argc, char **argv)
        ino_t maxino;
 
        spcl.c_date = 0;
-       (void)time((time_t *)&spcl.c_date);
+       time((time_t *)&spcl.c_date);
 
        tsize = 0;      /* Default later, based on 'c' option for cart tapes */
        if ((tape = getenv("TAPE")) == NULL)
@@ -189,8 +189,7 @@ main(int argc, char **argv)
                case 'T':               /* time of last dump */
                        spcl.c_ddate = unctime(optarg);
                        if (spcl.c_ddate < 0) {
-                               (void)fprintf(stderr, "bad time \"%s\"\n",
-                                   optarg);
+                               fprintf(stderr, "bad time \"%s\"\n", optarg);
                                exit(X_STARTUP);
                        }
                        Tflag = 1;
@@ -213,21 +212,20 @@ main(int argc, char **argv)
        argv += optind;
 
        if (argc < 1) {
-               (void)fprintf(stderr, "Must specify disk or filesystem\n");
+               fprintf(stderr, "Must specify disk or filesystem\n");
                exit(X_STARTUP);
        }
        disk = *argv++;
        argc--;
        if (argc >= 1) {
-               (void)fprintf(stderr, "Unknown arguments to dump:");
+               fprintf(stderr, "Unknown arguments to dump:");
                while (argc--)
-                       (void)fprintf(stderr, " %s", *argv++);
-               (void)fprintf(stderr, "\n");
+                       fprintf(stderr, " %s", *argv++);
+               fprintf(stderr, "\n");
                exit(X_STARTUP);
        }
        if (Tflag && uflag) {
-               (void)fprintf(stderr,
-                   "You cannot use the T and u flags together.\n");
+               fprintf(stderr, "You cannot use the T and u flags together.\n");
                exit(X_STARTUP);
        }
        if (strcmp(tape, "-") == 0) {
@@ -260,17 +258,17 @@ main(int argc, char **argv)
                *tape++ = '\0';
 #ifdef RDUMP
                if (strchr(tape, '\n')) {
-                   (void)fprintf(stderr, "invalid characters in tape\n");
+                   fprintf(stderr, "invalid characters in tape\n");
                    exit(X_STARTUP);
                }
                if (rmthost(host) == 0)
                        exit(X_STARTUP);
 #else
-               (void)fprintf(stderr, "remote dump not enabled\n");
+               fprintf(stderr, "remote dump not enabled\n");
                exit(X_STARTUP);
 #endif
        }
-       (void)setuid(getuid()); /* rmthost() is the only reason to be setuid */
+       setuid(getuid()); /* rmthost() is the only reason to be setuid */
 
        if (signal(SIGHUP, SIG_IGN) != SIG_IGN)
                signal(SIGHUP, sig);
@@ -297,17 +295,16 @@ main(int argc, char **argv)
        dt = fstabsearch(disk);
        if (dt != NULL) {
                disk = rawname(dt->fs_spec);
-               (void)strncpy(spcl.c_dev, dt->fs_spec, NAMELEN);
-               (void)strncpy(spcl.c_filesys, dt->fs_file, NAMELEN);
+               strncpy(spcl.c_dev, dt->fs_spec, NAMELEN);
+               strncpy(spcl.c_filesys, dt->fs_file, NAMELEN);
        } else {
-               (void)strncpy(spcl.c_dev, disk, NAMELEN);
-               (void)strncpy(spcl.c_filesys, "an unlisted file system",
-                   NAMELEN);
+               strncpy(spcl.c_dev, disk, NAMELEN);
+               strncpy(spcl.c_filesys, "an unlisted file system", NAMELEN);
        }
        spcl.c_dev[NAMELEN-1]='\0';
        spcl.c_filesys[NAMELEN-1]='\0';
-       (void)strcpy(spcl.c_label, "none");
-       (void)gethostname(spcl.c_host, NAMELEN);
+       strcpy(spcl.c_label, "none");
+       gethostname(spcl.c_host, NAMELEN);
        spcl.c_level = level - '0';
        spcl.c_type = TS_TAPE;
        if (!Tflag)
@@ -429,7 +426,7 @@ main(int argc, char **argv)
        "can't allocate tape buffers - try a smaller blocking factor.\n");
 
        startnewtape(1);
-       (void)time((time_t *)&(tstart_writing));
+       time((time_t *)&(tstart_writing));
        dumpmap(usedinomap, TS_CLRI, maxino - 1);
 
        passno = 3;
@@ -449,7 +446,7 @@ main(int argc, char **argv)
                dp = getino(ino);
                if ((dp->di_mode & IFMT) != IFDIR)
                        continue;
-               (void)dumpino(dp, ino);
+               dumpino(dp, ino);
        }
 
        passno = 4;
@@ -471,7 +468,7 @@ main(int argc, char **argv)
                mode = dp->di_mode & IFMT;
                if (mode == IFDIR)
                        continue;
-               (void)dumpino(dp, ino);
+               dumpino(dp, ino);
        }
 
        time(&tend_writing);
@@ -547,15 +544,15 @@ sig(int signo)
                if (pipeout)
                        quit("Signal on pipe: cannot recover\n");
                msg("Rewriting attempted as response to unknown signal.\n");
-               (void)fflush(stderr);
-               (void)fflush(stdout);
+               fflush(stderr);
+               fflush(stdout);
                close_rewind();
                exit(X_REWRITE);
                /* NOTREACHED */
        case SIGSEGV:
                msg("SIGSEGV: ABORTING!\n");
-               (void)signal(SIGSEGV, SIG_DFL);
-               (void)kill(0, SIGSEGV);
+               signal(SIGSEGV, SIG_DFL);
+               kill(0, SIGSEGV);
                /* NOTREACHED */
        }
 }
@@ -581,11 +578,11 @@ rawname(char *cp)
        if (dp == NULL)
                return (NULL);
        *dp = '\0';
-       (void)strncpy(rawbuf, cp, MAXPATHLEN - 1);
+       strncpy(rawbuf, cp, MAXPATHLEN - 1);
        rawbuf[MAXPATHLEN-1] = '\0';
        *dp = '/';
-       (void)strncat(rawbuf, "/r", MAXPATHLEN - 1 - strlen(rawbuf));
-       (void)strncat(rawbuf, dp + 1, MAXPATHLEN - 1 - strlen(rawbuf));
+       strncat(rawbuf, "/r", MAXPATHLEN - 1 - strlen(rawbuf));
+       strncat(rawbuf, dp + 1, MAXPATHLEN - 1 - strlen(rawbuf));
        return (rawbuf);
 }
 
@@ -636,7 +633,7 @@ obsolete(int *argcp, char ***argvp)
                                err(1, NULL);
                        nargv[0][0] = '-';
                        nargv[0][1] = *ap;
-                       (void)strcpy(&nargv[0][2], *argv);
+                       strcpy(&nargv[0][2], *argv);
                        ++argv;
                        ++nargv;
                        break;
index 5337f78..f67ca4d 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)optr.c  8.2 (Berkeley) 1/6/94
  * $FreeBSD: src/sbin/dump/optr.c,v 1.9.2.5 2002/02/23 22:32:51 iedowse Exp $
- * $DragonFly: src/sbin/dump/optr.c,v 1.4 2003/11/01 17:15:58 drhodus Exp $
+ * $DragonFly: src/sbin/dump/optr.c,v 1.5 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -95,20 +95,19 @@ query(char *question)
                } else if (replybuffer[0] == 'n' || replybuffer[0] == 'N') {
                        back = 0;
                } else {
-                       (void) fprintf(stderr,
-                           "  DUMP: \"Yes\" or \"No\"?\n");
-                       (void) fprintf(stderr,
-                           "  DUMP: %s: (\"yes\" or \"no\") ", question);
+                       fprintf(stderr, "  DUMP: \"Yes\" or \"No\"?\n");
+                       fprintf(stderr, "  DUMP: %s: (\"yes\" or \"no\") ",
+                           question);
                }
        } while (back < 0);
 
        /*
         *      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,8 +122,7 @@ alarmcatch()
 {
        if (notify == 0) {
                if (timeout == 0)
-                       (void) fprintf(stderr,
-                           "  DUMP: %s: (\"yes\" or \"no\") ",
+                       fprintf(stderr, "  DUMP: %s: (\"yes\" or \"no\") ",
                            attnmessage);
                else
                        msgtail("\a\a");
@@ -133,11 +131,10 @@ alarmcatch()
                        msgtail("\n");
                        broadcast("");          /* just print last msg */
                }
-               (void) fprintf(stderr,"  DUMP: %s: (\"yes\" or \"no\") ",
-                   attnmessage);
+               fprintf(stderr,"  DUMP: %s: (\"yes\" or \"no\") ", attnmessage);
        }
        signal(SIGALRM, alarmcatch);
-       (void) alarm(120);
+       alarm(120);
        timeout = 1;
 }
 
@@ -168,13 +165,13 @@ broadcast(char *message)
        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 +187,7 @@ timeest(void)
        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 +219,15 @@ msg(const char *fmt, ...)
 {
        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 +237,7 @@ msgtail(const char *fmt, ...)
        va_list ap;
 
        va_start(ap, fmt);
-       (void) vfprintf(stderr, fmt, ap);
+       vfprintf(stderr, fmt, ap);
        va_end(ap);
 }
 
@@ -249,15 +246,15 @@ quit(const char *fmt, ...)
 {
        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 +308,7 @@ getfstab(void)
                pf->pf_fstab = fs;
                SLIST_INSERT_HEAD(&table, pf, pf_list);
        }
-       (void) endfsent();
+       endfsent();
 }
 
 /*
@@ -363,15 +360,15 @@ lastdump(int arg)
        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 +386,7 @@ lastdump(int arg)
                                     + (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 31fba3e..1848a50 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)tape.c  8.4 (Berkeley) 5/1/95
  * $FreeBSD: src/sbin/dump/tape.c,v 1.12.2.3 2002/02/23 22:32:51 iedowse Exp $
- * $DragonFly: src/sbin/dump/tape.c,v 1.6 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/dump/tape.c,v 1.7 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -337,7 +337,7 @@ trewind(void)
                                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 */;
@@ -357,13 +357,13 @@ trewind(void)
        }
 #endif
        if (fstat(tapefd, &sb) == 0 && S_ISFIFO(sb.st_mode)) {
-               (void)close(tapefd);
+               close(tapefd);
                return;
        }
-       (void) close(tapefd);
+       close(tapefd);
        while ((f = open(tape, 0)) < 0)
                sleep (10);
-       (void) close(f);
+       close(f);
 }
 
 void
@@ -374,7 +374,7 @@ close_rewind(void)
        trewind();
        if (nexttape)
                return;
-       (void)time((time_t *)&(tstart_changevol));
+       time((time_t *)&(tstart_changevol));
        if (!nogripe) {
                msg("Change Volumes: Mount volume #%d\n", tapeno+1);
                broadcast("CHANGE DUMP VOLUMES!\a\a\n");
@@ -384,7 +384,7 @@ close_rewind(void)
                        dumpabort(0);
                        /*NOTREACHED*/
                }
-       (void)time((time_t *)&(tend_changevol));
+       time((time_t *)&(tend_changevol));
        if ((tstart_changevol != (time_t)-1) && (tend_changevol != (time_t)-1))
                tstart_writing += (tend_changevol - tstart_changevol);
 }
@@ -522,7 +522,7 @@ startnewtape(int top)
        parentpid = getpid();
 
 restore_check_point:
-       (void)signal(SIGINT, interrupt_save);
+       signal(SIGINT, interrupt_save);
        /*
         *      All signals are inherited...
         */
@@ -646,7 +646,7 @@ dumpabort(int signo)
 
        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 @@ enslave(void)
                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,9 +716,9 @@ enslave(void)
        }
 
        for (i = 0; i < SLAVES; i++)
-               (void) atomic(write, slaves[i].fd,
-                             (char *) &slaves[(i + 1) % SLAVES].pid,
-                             sizeof slaves[0].pid);
+               atomic(write, slaves[i].fd,
+                   (char *) &slaves[(i + 1) % SLAVES].pid,
+                   sizeof slaves[0].pid);
 
        master = 0;
 }
@@ -730,7 +730,7 @@ killall(void)
 
        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 @@ doslave(register int cmd, int slave_number)
        /*
         * 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 @@ doslave(register int cmd, int slave_number)
                if (setjmp(jmpbuf) == 0) {
                        ready = 1;
                        if (!caught)
-                               (void) pause();
+                               pause();
                }
                ready = 0;
                caught = 0;
@@ -830,22 +830,22 @@ doslave(register int cmd, int slave_number)
                        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));
index 1687051..3879632 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1983, 1992, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)dumpfs.c        8.5 (Berkeley) 4/29/95
  * $FreeBSD: src/sbin/dumpfs/dumpfs.c,v 1.13.2.1 2001/01/22 18:10:11 iedowse Exp $
- * $DragonFly: src/sbin/dumpfs/dumpfs.c,v 1.5 2003/11/01 17:15:58 drhodus Exp $
+ * $DragonFly: src/sbin/dumpfs/dumpfs.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -109,12 +109,12 @@ dumpfs(char *name)
        if (n != SBSIZE) {
                warnx("%s: non-existent or truncated superblock, skipped",
                    name);
-               (void)close(fd);
+               close(fd);
                return (1);
        }
        if (afs.fs_magic != FS_MAGIC) {
                warnx("%s: superblock has bad magic number, skipped", name);
-               (void)close(fd);
+               close(fd);
                return (1);
        }
 
@@ -222,11 +222,11 @@ dumpfs(char *name)
        for (i = 0; i < afs.fs_ncg; i++)
                if (dumpcg(name, fd, i))
                        goto err;
-       (void)close(fd);
+       close(fd);
        return (0);
 
 err:   if (fd != -1)
-               (void)close(fd);
+               close(fd);
        warn("%s", name);
        return (1);
 };
@@ -321,6 +321,6 @@ pbits(register void *vp, int max)
 void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: dumpfs filesys | device\n");
+       fprintf(stderr, "usage: dumpfs filesys | device\n");
        exit(1);
 }
index 0fa1dbd..674d633 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)dir.c   8.8 (Berkeley) 4/28/95
  * $FreeBSD: src/sbin/fsck/dir.c,v 1.15 1999/08/28 00:12:45 peter Exp $
- * $DragonFly: src/sbin/fsck/dir.c,v 1.6 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/fsck/dir.c,v 1.7 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -486,7 +486,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name)
                pfatal("SORRY. NO lost+found DIRECTORY\n\n");
                return (0);
        }
-       (void)lftempname(tempname, orphan);
+       lftempname(tempname, orphan);
        if (makeentry(lfdir, orphan, (name ? name : tempname)) == 0) {
                pfatal("SORRY. NO SPACE IN lost+found DIRECTORY");
                printf("\n\n");
@@ -496,7 +496,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name)
        if (lostdir) {
                if ((changeino(orphan, "..", lfdir) & ALTERED) == 0 &&
                    parentdir != (ino_t)-1)
-                       (void)makeentry(orphan, lfdir, "..");
+                       makeentry(orphan, lfdir, "..");
                dp = ginode(lfdir);
                dp->di_nlink++;
                inodirty();
index 44914f0..1a84478 100644 (file)
@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/fsck/fsutil.c,v 1.2.2.1 2001/08/01 05:47:55 obrien Exp $
- * $DragonFly: src/sbin/fsck/fsutil.c,v 1.4 2003/11/01 17:15:58 drhodus Exp $
+ * $DragonFly: src/sbin/fsck/fsutil.c,v 1.5 2004/12/18 21:43:38 swildner Exp $
  *
  * $NetBSD: fsutil.c,v 1.7 1998/07/30 17:41:03 thorpej Exp $
  */
@@ -93,7 +93,7 @@ errexit(const char *fmt, ...)
        va_list ap;
 
        va_start(ap, fmt);
-       (void) vfprintf(stderr, fmt, ap);
+       vfprintf(stderr, fmt, ap);
        va_end(ap);
        exit(8);
 }
@@ -102,15 +102,15 @@ static void
 vmsg(int fatal, const char *fmt, va_list ap)
 {
        if (!fatal && preen)
-               (void) printf("%s: ", dev);
+               printf("%s: ", dev);
 
-       (void) vprintf(fmt, ap);
+       vprintf(fmt, ap);
 
        if (fatal && preen)
-               (void) printf("\n");
+               printf("\n");
 
        if (fatal && preen) {
-               (void) printf(
+               printf(
                    "%s: UNEXPECTED INCONSISTENCY; RUN %s MANUALLY.\n",
                    dev, __progname);
                exit(8);
@@ -170,7 +170,7 @@ unrawname(const char *name)
                return (name);
        if (dp[1] != 'r')
                return (name);
-       (void)snprintf(unrawbuf, 32, "%.*s/%s", (int)(dp - name), name, dp + 2);
+       snprintf(unrawbuf, 32, "%.*s/%s", (int)(dp - name), name, dp + 2);
        return (unrawbuf);
 }
 
@@ -182,7 +182,7 @@ rawname(const char *name)
 
        if ((dp = strrchr(name, '/')) == 0)
                return (0);
-       (void)snprintf(rawbuf, 32, "%.*s/r%s", (int)(dp - name), name, dp + 1);
+       snprintf(rawbuf, 32, "%.*s/r%s", (int)(dp - name), name, dp + 1);
        return (rawbuf);
 }
 
index 7950435..5e17c80 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)inode.c 8.8 (Berkeley) 4/28/95
  * $FreeBSD: src/sbin/fsck/inode.c,v 1.20 2000/02/28 20:02:41 mckusick Exp $
- * $DragonFly: src/sbin/fsck/inode.c,v 1.6 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/fsck/inode.c,v 1.7 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -173,7 +173,7 @@ iblock(struct inodesc *idesc, long ilevel, quad_t isize)
                for (ap = &bp->b_un.b_indir[nif]; ap < aplim; ap++) {
                        if (*ap == 0)
                                continue;
-                       (void)sprintf(buf, "PARTIALLY TRUNCATED INODE I=%lu",
+                       sprintf(buf, "PARTIALLY TRUNCATED INODE I=%lu",
                            (u_long)idesc->id_number);
                        if (dofix(idesc, buf)) {
                                *ap = 0;
@@ -317,7 +317,7 @@ getnextinode(ino_t inumber)
                 * If bread returns an error, it will already have zeroed
                 * out the buffer, so we do not need to do so here.
                 */
-               (void)bread(fsreadfd, (char *)inodebuf, dblk, size);
+               bread(fsreadfd, (char *)inodebuf, dblk, size);
                dp = inodebuf;
        }
        return (dp++);
@@ -455,7 +455,7 @@ clri(register struct inodesc *idesc, char *type, int flag)
                if (preen)
                        printf(" (CLEARED)\n");
                n_files--;
-               (void)ckinode(dp, idesc);
+               ckinode(dp, idesc);
                clearinode(dp);
                inoinfo(idesc->id_number)->ino_state = USTATE;
                inodirty();
@@ -628,7 +628,7 @@ freeino(ino_t ino)
        idesc.id_func = pass4check;
        idesc.id_number = ino;
        dp = ginode(ino);
-       (void)ckinode(dp, &idesc);
+       ckinode(dp, &idesc);
        clearinode(dp);
        inodirty();
        inoinfo(ino)->ino_state = USTATE;
index 9b2f4b8..b2e3ba9 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1980, 1986, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)main.c  8.6 (Berkeley) 5/14/95
  * $FreeBSD: src/sbin/fsck/main.c,v 1.21.2.1 2001/01/23 23:11:07 iedowse Exp $
- * $DragonFly: src/sbin/fsck/main.c,v 1.7 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/fsck/main.c,v 1.8 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -122,9 +122,9 @@ main(int argc, char **argv)
        argc -= optind;
        argv += optind;
        if (signal(SIGINT, SIG_IGN) != SIG_IGN)
-               (void)signal(SIGINT, catch);
+               signal(SIGINT, catch);
        if (preen)
-               (void)signal(SIGQUIT, catchquit);
+               signal(SIGQUIT, catchquit);
        signal(SIGINFO, infohandler);
        /*
         * Push up our allowed memory limit so we can cope
@@ -132,7 +132,7 @@ main(int argc, char **argv)
         */
        if (getrlimit(RLIMIT_DATA, &rlimit) == 0) {
                rlimit.rlim_cur = rlimit.rlim_max;
-               (void)setrlimit(RLIMIT_DATA, &rlimit);
+               setrlimit(RLIMIT_DATA, &rlimit);
        }
        if (argc) {
                while (argc-- > 0) {
@@ -141,7 +141,7 @@ main(int argc, char **argv)
                        if (path == NULL)
                                pfatal("Can't check %s\n", *argv);
                        else
-                               (void)checkfilesys(path, 0, 0L, 0);
+                               checkfilesys(path, 0, 0L, 0);
                        ++argv;
                }
                exit(0);
@@ -193,7 +193,7 @@ checkfilesys(char *filesys, char *mntpt, long auxdata, int child)
        int cylno;
 
        if (preen && child)
-               (void)signal(SIGQUIT, voidquit);
+               signal(SIGQUIT, voidquit);
        cdevname = filesys;
        if (debug && preen)
                pwarn("starting\n");
index 8efcb03..42dd151 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)pass1.c 8.6 (Berkeley) 4/28/95
  * $FreeBSD: src/sbin/fsck/pass1.c,v 1.16.2.5 2002/06/23 22:34:58 iedowse Exp $
- * $DragonFly: src/sbin/fsck/pass1.c,v 1.5 2003/11/01 17:15:58 drhodus Exp $
+ * $DragonFly: src/sbin/fsck/pass1.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -137,7 +137,7 @@ pass1(void)
                 */
                for (i = 0; i < inosused; i++, inumber++) {
                        if (inumber < ROOTINO) {
-                               (void)getnextinode(inumber);
+                               getnextinode(inumber);
                                continue;
                        }
                        checkinode(inumber, &idesc);
@@ -322,7 +322,7 @@ checkinode(inumber, idesc)
        }
        badblk = dupblk = 0;
        idesc->id_number = inumber;
-       (void)ckinode(dp, idesc);
+       ckinode(dp, idesc);
        idesc->id_entryno *= btodb(sblock.fs_fsize);
        if (dp->di_blocks != idesc->id_entryno) {
                pwarn("INCORRECT BLOCK COUNT I=%lu (%ld should be %ld)",
index bedc980..9b020fa 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)pass2.c 8.9 (Berkeley) 4/28/95
  * $FreeBSD: src/sbin/fsck/pass2.c,v 1.10.2.2 2001/11/24 15:14:59 iedowse Exp $
- * $DragonFly: src/sbin/fsck/pass2.c,v 1.6 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/fsck/pass2.c,v 1.7 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -174,7 +174,7 @@ pass2(void)
                memmove(&dp->di_db[0], &inp->i_blks[0], (size_t)inp->i_numblks);
                curino.id_number = inp->i_number;
                curino.id_parent = inp->i_parent;
-               (void)ckinode(dp, &curino);
+               ckinode(dp, &curino);
        }
        /*
         * Now that the parents of all directories have been found,
@@ -195,7 +195,7 @@ pass2(void)
                        fileerror(inp->i_parent, inp->i_number, "MISSING '..'");
                        if (reply("FIX") == 0)
                                continue;
-                       (void)makeentry(inp->i_number, inp->i_parent, "..");
+                       makeentry(inp->i_number, inp->i_parent, "..");
                        inoinfo(inp->i_parent)->ino_linkcnt--;
                        continue;
                }
@@ -206,7 +206,7 @@ pass2(void)
                inoinfo(inp->i_dotdot)->ino_linkcnt++;
                inoinfo(inp->i_parent)->ino_linkcnt--;
                inp->i_dotdot = inp->i_parent;
-               (void)changeino(inp->i_number, "..", inp->i_parent);
+               changeino(inp->i_number, "..", inp->i_parent);
        }
        /*
         * Mark all the directories that can be found from the root.
@@ -260,7 +260,7 @@ pass2check(struct inodesc *idesc)
        else
                proto.d_type = 0;
        proto.d_namlen = 1;
-       (void)strcpy(proto.d_name, ".");
+       strcpy(proto.d_name, ".");
 #      if BYTE_ORDER == LITTLE_ENDIAN
                if (!newinofmt) {
                        u_char tmp;
@@ -303,7 +303,7 @@ chk1:
        else
                proto.d_type = 0;
        proto.d_namlen = 2;
-       (void)strcpy(proto.d_name, "..");
+       strcpy(proto.d_name, "..");
 #      if BYTE_ORDER == LITTLE_ENDIAN
                if (!newinofmt) {
                        u_char tmp;
index 4231d57..8e2831e 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)preen.c 8.5 (Berkeley) 4/28/95
  * $FreeBSD: src/sbin/fsck/preen.c,v 1.16 1999/12/30 16:32:40 peter Exp $
- * $DragonFly: src/sbin/fsck/preen.c,v 1.7 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/fsck/preen.c,v 1.8 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -189,7 +189,7 @@ checkfstab(int preen, int maxrun, int (*docheck)(struct fstab *),
                            pt->next ? ", " : "\n");
                return (sumstatus);
        }
-       (void)endfsent();
+       endfsent();
        return (0);
 }
 
@@ -221,7 +221,7 @@ finddisk(char *name)
                fprintf(stderr, "out of memory");
                exit (8);
        }
-       (void)strncpy(dk->name, name, len);
+       strncpy(dk->name, name, len);
        dk->name[len] = '\0';
        dk->part = NULL;
        dk->next = NULL;
@@ -250,12 +250,12 @@ addpart(char *name, char *fsname, long auxdata)
                fprintf(stderr, "out of memory");
                exit (8);
        }
-       (void)strcpy(pt->name, name);
+       strcpy(pt->name, name);
        if ((pt->fsname = malloc(strlen(fsname) + 1)) == NULL) {
                fprintf(stderr, "out of memory");
                exit (8);
        }
-       (void)strcpy(pt->fsname, fsname);
+       strcpy(pt->fsname, fsname);
        pt->next = NULL;
        pt->auxdata = auxdata;
 }
index 03d5fdd..46aa663 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)utilities.c     8.6 (Berkeley) 5/19/95
  * $FreeBSD: src/sbin/fsck/utilities.c,v 1.11.2.3 2001/01/23 23:11:07 iedowse Exp $
- * $DragonFly: src/sbin/fsck/utilities.c,v 1.6 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/fsck/utilities.c,v 1.7 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -92,7 +92,7 @@ reply(char *question)
        }
        do      {
                printf("%s? [yn] ", question);
-               (void) fflush(stdout);
+               fflush(stdout);
                c = getc(stdin);
                while (c != '\n' && getc(stdin) != '\n') {
                        if (feof(stdin)) {
@@ -252,7 +252,7 @@ ckfini(int markclean)
        int ofsmodified, cnt = 0;
 
        if (fswritefd < 0) {
-               (void)close(fsreadfd);
+               close(fsreadfd);
                return;
        }
        flush(fswritefd, &sblk);
@@ -293,8 +293,8 @@ ckfini(int markclean)
        if (debug)
                printf("cache missed %ld of %ld (%d%%)\n", diskreads,
                    totalreads, (int)(diskreads * 100 / totalreads));
-       (void)close(fsreadfd);
-       (void)close(fswritefd);
+       close(fsreadfd);
+       close(fswritefd);
 }
 
 int
@@ -318,7 +318,7 @@ bread(int fd, char *buf, ufs_daddr_t blk, long size)
        printf("THE FOLLOWING DISK SECTORS COULD NOT BE READ:");
        for (cp = buf, i = 0; i < size; i += secsize, cp += secsize) {
                if (read(fd, cp, (int)secsize) != secsize) {
-                       (void)lseek(fd, offset + i + secsize, 0);
+                       lseek(fd, offset + i + secsize, 0);
                        if (secsize != dev_bsize && dev_bsize != 1)
                                printf(" %ld (%ld),",
                                    (blk * dev_bsize + i) / secsize,
@@ -358,7 +358,7 @@ bwrite(int fd, char *buf, ufs_daddr_t blk, long size)
        printf("THE FOLLOWING SECTORS COULD NOT BE WRITTEN:");
        for (cp = buf, i = 0; i < size; i += dev_bsize, cp += dev_bsize)
                if (write(fd, cp, (int)dev_bsize) != dev_bsize) {
-                       (void)lseek(fd, offset + i + dev_bsize, 0);
+                       lseek(fd, offset + i + dev_bsize, 0);
                        printf(" %ld,", blk + i / dev_bsize);
                }
        printf("\n");
@@ -418,7 +418,7 @@ freeblk(ufs_daddr_t blkno, long frags)
 
        idesc.id_blkno = blkno;
        idesc.id_numfrags = frags;
-       (void)pass4check(&idesc);
+       pass4check(&idesc);
 }
 
 /*
@@ -433,13 +433,13 @@ getpathname(char *namebuf, ino_t curdir, ino_t ino)
        static int busy = 0;
 
        if (curdir == ino && ino == ROOTINO) {
-               (void)strcpy(namebuf, "/");
+               strcpy(namebuf, "/");
                return;
        }
        if (busy ||
            (inoinfo(curdir)->ino_state != DSTATE &&
             inoinfo(curdir)->ino_state != DFOUND)) {
-               (void)strcpy(namebuf, "?");
+               strcpy(namebuf, "?");
                return;
        }
        busy = 1;
@@ -499,7 +499,7 @@ catchquit(int sig)
 {
        printf("returning to single-user after filesystem check\n");
        returntosingle = 1;
-       (void)signal(SIGQUIT, SIG_DFL);
+       signal(SIGQUIT, SIG_DFL);
 }
 
 /*
@@ -512,8 +512,8 @@ voidquit(int sig)
 {
 
        sleep(1);
-       (void)signal(SIGQUIT, SIG_IGN);
-       (void)signal(SIGQUIT, SIG_DFL);
+       signal(SIGQUIT, SIG_IGN);
+       signal(SIGQUIT, SIG_DFL);
 }
 
 /* ARGSUSED */
@@ -576,18 +576,18 @@ pfatal(const char *fmt, ...)
        va_list ap;
        va_start(ap, fmt);
        if (!preen) {
-               (void)vfprintf(stderr, fmt, ap);
+               vfprintf(stderr, fmt, ap);
                va_end(ap);
                if (usedsoftdep)
-                       (void)fprintf(stderr,
+                       fprintf(stderr,
                            "\nUNEXPECTED SOFT UPDATE INCONSISTENCY\n");
                return;
        }
        if (cdevname == NULL)
                cdevname = "fsck";
-       (void)fprintf(stderr, "%s: ", cdevname);
-       (void)vfprintf(stderr, fmt, ap);
-       (void)fprintf(stderr,
+       fprintf(stderr, "%s: ", cdevname);
+       vfprintf(stderr, fmt, ap);
+       fprintf(stderr,
            "\n%s: UNEXPECTED%sINCONSISTENCY; RUN fsck MANUALLY.\n",
            cdevname, usedsoftdep ? " SOFT UPDATE " : " ");
        ckfini(0);
@@ -604,8 +604,8 @@ pwarn(const char *fmt, ...)
        va_list ap;
        va_start(ap, fmt);
        if (preen)
-               (void)fprintf(stderr, "%s: ", cdevname);
-       (void)vfprintf(stderr, fmt, ap);
+               fprintf(stderr, "%s: ", cdevname);
+       vfprintf(stderr, fmt, ap);
        va_end(ap);
 }
 
@@ -619,7 +619,7 @@ panic(const char *fmt, ...)
 
        va_start(ap, fmt);
        pfatal("INTERNAL INCONSISTENCY:");
-       (void)vfprintf(stderr, fmt, ap);
+       vfprintf(stderr, fmt, ap);
        va_end(ap);
        exit(EEXIT);
 }
index 1d465b2..7aa8b66 100644 (file)
@@ -33,7 +33,7 @@
  *
  * $NetBSD: dir.c,v 1.14 1998/08/25 19:18:15 ross Exp $
  * $FreeBSD: src/sbin/fsck_msdosfs/dir.c,v 1.1.2.1 2001/08/01 05:47:55 obrien Exp $
- * $DragonFly: src/sbin/fsck_msdosfs/dir.c,v 1.5 2003/11/03 19:51:05 eirikn Exp $
+ * $DragonFly: src/sbin/fsck_msdosfs/dir.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 
@@ -946,7 +946,7 @@ reconnect(int dosfs, struct bootblock *boot, struct fatEntry *fat, cl_t head)
        boot->NumFiles++;
        /* Ensure uniqueness of entry here!                             XXX */
        memset(&d, 0, sizeof d);
-       (void)snprintf(d.name, sizeof(d.name), "%u", head);
+       snprintf(d.name, sizeof(d.name), "%u", head);
        d.flags = 0;
        d.head = head;
        d.size = fat[head].length * boot->ClusterSize;
index ceca44b..c9d4e89 100644 (file)
@@ -30,7 +30,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/fsirand/fsirand.c,v 1.7.2.1 2000/07/01 06:23:36 ps Exp $
- * $DragonFly: src/sbin/fsirand/fsirand.c,v 1.5 2003/11/01 17:15:59 drhodus Exp $
+ * $DragonFly: src/sbin/fsirand/fsirand.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/disklabel.h>
@@ -90,7 +90,7 @@ main(int argc, char **argv)
 
        for (n = optind; n < argc; n++) {
                if (argc - optind != 1)
-                       (void)puts(argv[n]);
+                       puts(argv[n]);
                ex += fsirand(argv[n]);
                if (n < argc - 1)
                        putchar('\n');
@@ -128,7 +128,7 @@ fsirand(char *device)
        }
 
        /* Read in master superblock */
-       (void)memset(&sbuf, 0, sizeof(sbuf));
+       memset(&sbuf, 0, sizeof(sbuf));
        sblock = (struct fs *)&sbuf;
        if (lseek(devfd, SBOFF, SEEK_SET) == -1) {
                warn("can't seek to superblock (%qd) on %s", SBOFF, device);
@@ -195,10 +195,10 @@ fsirand(char *device)
 
        if (printonly && (sblock->fs_id[0] || sblock->fs_id[1])) {
                if (sblock->fs_inodefmt >= FS_44INODEFMT && sblock->fs_id[0])
-                       (void)printf("%s was randomized on %s", device,
+                       printf("%s was randomized on %s", device,
                            ctime((const time_t *)&(sblock->fs_id[0])));
-               (void)printf("fsid: %x %x\n", sblock->fs_id[0],
-                           sblock->fs_id[1]);
+               printf("fsid: %x %x\n", sblock->fs_id[0],
+                   sblock->fs_id[1]);
        }
 
        /* Randomize fs_id unless old 4.2BSD filesystem */
@@ -249,8 +249,8 @@ fsirand(char *device)
                for (n = 0; n < sblock->fs_ipg; n++, inumber++) {
                        if (inumber >= ROOTINO) {
                                if (printonly)
-                                       (void)printf("ino %d gen %x\n", inumber,
-                                                    inodebuf[n].di_gen);
+                                       printf("ino %d gen %x\n", inumber,
+                                           inodebuf[n].di_gen);
                                else
                                        inodebuf[n].di_gen = random();
                        }
@@ -271,7 +271,7 @@ fsirand(char *device)
                        }
                }
        }
-       (void)close(devfd);
+       close(devfd);
 
        return(0);
 }
@@ -279,7 +279,7 @@ fsirand(char *device)
 static void
 usage(void)
 {
-       (void)fprintf(stderr, 
-               "usage: fsirand [-b] [-f] [-p] special [special ...]\n");
+       fprintf(stderr,
+           "usage: fsirand [-b] [-f] [-p] special [special ...]\n");
        exit(1);
 }
index a3673a1..13c48f6 100644 (file)
@@ -24,7 +24,7 @@
  * the rights to redistribute these changes.
  *
  * $FreeBSD: /repoman/r/ncvs/src/sbin/i386/fdisk/fdisk.c,v 1.36.2.14 2004/01/30 14:40:47 harti Exp $
- * $DragonFly: src/sbin/i386/fdisk/fdisk.c,v 1.9 2004/07/08 17:50:46 cpressey Exp $
+ * $DragonFly: src/sbin/i386/fdisk/fdisk.c,v 1.10 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/disklabel.h>
@@ -872,12 +872,12 @@ write_s0(void)
                        return -1;
 #ifdef NOT_NOW
                        flag = 0;
-                       (void) ioctl(fd, DIOCWLABEL, &flag);
+                       ioctl(fd, DIOCWLABEL, &flag);
 #endif
                }
 #ifdef NOT_NOW
        flag = 0;
-       (void) ioctl(fd, DIOCWLABEL, &flag);
+       ioctl(fd, DIOCWLABEL, &flag);
 #endif
        return(0);
 }
index 1132acb..179aaf4 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1983, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)ifconfig.c      8.2 (Berkeley) 2/16/94
  * $FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.96 2004/02/27 06:43:14 kan Exp $
- * $DragonFly: src/sbin/ifconfig/ifconfig.c,v 1.11 2004/07/07 10:01:15 joerg Exp $
+ * $DragonFly: src/sbin/ifconfig/ifconfig.c,v 1.12 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -1977,7 +1977,7 @@ clone_create(void)
                err(1, "socket");
 
        memset(&ifr, 0, sizeof(ifr));
-       (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
+       strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
        if (ioctl(s, SIOCIFCREATE, &ifr) < 0)
                err(1, "SIOCIFCREATE");
 
@@ -1998,7 +1998,7 @@ void
 clone_destroy(const char *val, int d, int s, const struct afswtch *rafp)
 {
 
-       (void) strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
+       strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
        if (ioctl(s, SIOCIFDESTROY, &ifr) < 0)
                err(1, "SIOCIFDESTROY");
        /*
index a62cf0a..521b4d6 100644 (file)
@@ -23,7 +23,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.1.2.3 2002/02/07 15:12:37 ambrisko Exp $
- * $DragonFly: src/sbin/ifconfig/ifieee80211.c,v 1.5 2004/07/27 13:56:50 joerg Exp $
+ * $DragonFly: src/sbin/ifconfig/ifieee80211.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 /*-
@@ -289,8 +289,8 @@ ieee80211_status (int s, struct rt_addrinfo *info __unused)
        u_int8_t                data[32];
        char                    spacer;
 
-       (void) memset(&ireq, 0, sizeof(ireq));
-       (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name));
+       memset(&ireq, 0, sizeof(ireq));
+       strncpy(ireq.i_name, name, sizeof(ireq.i_name));
        ireq.i_data = &data;
 
        ireq.i_type = IEEE80211_IOC_SSID;
@@ -443,8 +443,8 @@ set80211(int s, int type, int val, int len, u_int8_t *data)
 {
        struct ieee80211req     ireq;
 
-       (void) memset(&ireq, 0, sizeof(ireq));
-       (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name));
+       memset(&ireq, 0, sizeof(ireq));
+       strncpy(ireq.i_name, name, sizeof(ireq.i_name));
        ireq.i_type = type;
        ireq.i_val = val;
        ireq.i_len = len;
index 46dfae0..a321137 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $      */
 /* $FreeBSD: src/sbin/ifconfig/ifmedia.c,v 1.6.2.3 2001/11/14 04:35:07 yar Exp $ */
-/* $DragonFly: src/sbin/ifconfig/ifmedia.c,v 1.5 2003/11/03 19:51:05 eirikn Exp $ */
+/* $DragonFly: src/sbin/ifconfig/ifmedia.c,v 1.6 2004/12/18 21:43:38 swildner Exp $ */
 
 /*
  * Copyright (c) 1997 Jason R. Thorpe.
@@ -108,8 +108,8 @@ media_status(int s, struct rt_addrinfo *info __unused)
        struct ifmediareq ifmr;
        int *media_list, i;
 
-       (void) memset(&ifmr, 0, sizeof(ifmr));
-       (void) strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name));
+       memset(&ifmr, 0, sizeof(ifmr));
+       strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name));
 
        if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
                /*
@@ -188,8 +188,8 @@ setmedia(const char *val, int d, int s, const struct afswtch *afp)
        struct ifmediareq ifmr;
        int first_type, subtype;
 
-       (void) memset(&ifmr, 0, sizeof(ifmr));
-       (void) strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name));
+       memset(&ifmr, 0, sizeof(ifmr));
+       strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name));
 
        ifmr.ifm_count = 1;
        ifmr.ifm_ulist = &first_type;
@@ -244,8 +244,8 @@ domediaopt(const char *val, int clear, int s)
        struct ifmediareq ifmr;
        int *mwords, options;
 
-       (void) memset(&ifmr, 0, sizeof(ifmr));
-       (void) strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name));
+       memset(&ifmr, 0, sizeof(ifmr));
+       strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name));
 
        /*
         * We must go through the motions of reading all
index 1de464f..220c68f 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1991, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)init.c  8.1 (Berkeley) 7/15/93
  * $FreeBSD: src/sbin/init/init.c,v 1.38.2.8 2001/10/22 11:27:32 des Exp $
- * $DragonFly: src/sbin/init/init.c,v 1.6 2004/11/20 04:09:34 dillon Exp $
+ * $DragonFly: src/sbin/init/init.c,v 1.7 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -308,8 +308,8 @@ invalid:
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = 0;
        sa.sa_handler = SIG_IGN;
-       (void) sigaction(SIGTTIN, &sa, (struct sigaction *)0);
-       (void) sigaction(SIGTTOU, &sa, (struct sigaction *)0);
+       sigaction(SIGTTIN, &sa, (struct sigaction *)0);
+       sigaction(SIGTTOU, &sa, (struct sigaction *)0);
 
        /*
         * Paranoia.
@@ -592,7 +592,7 @@ setctty(char *name)
 {
        int fd;
 
-       (void) revoke(name);
+       revoke(name);
        if ((fd = open(name, O_RDWR)) == -1) {
                stall("can't open %s: %m", name);
                _exit(1);
@@ -673,8 +673,7 @@ single_user(void)
 
 #define        SHREQUEST \
        "Enter full pathname of shell or RETURN for " _PATH_BSHELL ": "
-                       (void)write(STDERR_FILENO,
-                           SHREQUEST, sizeof(SHREQUEST) - 1);
+                       write(STDERR_FILENO, SHREQUEST, sizeof(SHREQUEST) - 1);
                        while ((num = read(STDIN_FILENO, cp, 1)) != -1 &&
                            num != 0 && *cp != '\n' && cp < &altshell[127])
                                        cp++;
@@ -769,8 +768,8 @@ runcom(void)
                sigemptyset(&sa.sa_mask);
                sa.sa_flags = 0;
                sa.sa_handler = SIG_IGN;
-               (void) sigaction(SIGTSTP, &sa, (struct sigaction *)0);
-               (void) sigaction(SIGHUP, &sa, (struct sigaction *)0);
+               sigaction(SIGTSTP, &sa, (struct sigaction *)0);
+               sigaction(SIGHUP, &sa, (struct sigaction *)0);
 
                setctty(_PATH_CONSOLE);
 
@@ -979,7 +978,7 @@ new_session(session_t *sprev, int session_index, register struct ttyent *typ)
        sp->se_flags |= SE_PRESENT;
 
        sp->se_device = malloc(sizeof(_PATH_DEV) + strlen(typ->ty_name));
-       (void) sprintf(sp->se_device, "%s%s", _PATH_DEV, typ->ty_name);
+       sprintf(sp->se_device, "%s%s", _PATH_DEV, typ->ty_name);
 
        /*
         * Attempt to open the device, if we get "device not configured"
@@ -1023,7 +1022,7 @@ setupargv(session_t *sp, struct ttyent *typ)
                free(sp->se_getty_argv);
        }
        sp->se_getty = malloc(strlen(typ->ty_getty) + strlen(typ->ty_name) + 2);
-       (void) sprintf(sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name);
+       sprintf(sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name);
        sp->se_getty_argv_space = strdup(sp->se_getty);
        sp->se_getty_argv = construct_argv(sp->se_getty_argv_space);
        if (sp->se_getty_argv == 0) {
@@ -1432,7 +1431,7 @@ catatonia(void)
 void
 alrm_handler(int sig)
 {
-       (void)sig;
+       sig;
        clang = 1;
 }
 
@@ -1456,7 +1455,7 @@ death(void)
        }
 
        /* Try to run the rc.shutdown script within a period of time */
-       (void) runshutdown();
+       runshutdown();
     
        for (i = 0; i < 2; ++i) {
                if (kill(-1, death_sigs[i]) == -1 && errno == ESRCH)
@@ -1515,15 +1514,15 @@ runshutdown(void)
                sigemptyset(&sa.sa_mask);
                sa.sa_flags = 0;
                sa.sa_handler = SIG_IGN;
-               (void) sigaction(SIGTSTP, &sa, (struct sigaction *)0);
-               (void) sigaction(SIGHUP, &sa, (struct sigaction *)0);
+               sigaction(SIGTSTP, &sa, (struct sigaction *)0);
+               sigaction(SIGHUP, &sa, (struct sigaction *)0);
 
                if ((fd = open(_PATH_CONSOLE, O_RDWR)) == -1)
                    warning("can't open %s: %m", _PATH_CONSOLE);
                else {
-                   (void) dup2(fd, 0);
-                   (void) dup2(fd, 1);
-                   (void) dup2(fd, 2);
+                   dup2(fd, 0);
+                   dup2(fd, 1);
+                   dup2(fd, 2);
                    if (fd > 2)
                        close(fd);
                }
index 7cef50b..ca5f25f 100644 (file)
@@ -49,7 +49,7 @@
  *
  * $Id: ip6fw.c,v 1.1.2.2.2.2 1999/05/14 05:13:50 shin Exp $
  * $FreeBSD: src/sbin/ip6fw/ip6fw.c,v 1.1.2.9 2003/04/05 10:54:51 ume Exp $
- * $DragonFly: src/sbin/ip6fw/ip6fw.c,v 1.7 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/ip6fw/ip6fw.c,v 1.8 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -1350,7 +1350,7 @@ main(int ac, char **av)
                                if ((f = fdopen(pipedes[0], "r")) == NULL) {
                                        int savederrno = errno;
 
-                                       (void)kill(preproc, SIGTERM);
+                                       kill(preproc, SIGTERM);
                                        errno = savederrno;
                                        err(EX_OSERR, "fdopen()");
                                }
index 947da24..1d59d92 100644 (file)
@@ -17,7 +17,7 @@
  * NEW command line interface for IP firewall facility
  *
  * $FreeBSD: src/sbin/ipfw/ipfw.c,v 1.80.2.26 2003/01/14 19:15:58 dillon Exp $
- * $DragonFly: src/sbin/ipfw/Attic/ipfw.c,v 1.6 2004/02/04 17:39:59 joerg Exp $
+ * $DragonFly: src/sbin/ipfw/Attic/ipfw.c,v 1.7 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -2460,7 +2460,7 @@ main(int ac, char *av[])
                                if ((f = fdopen(pipedes[0], "r")) == NULL) {
                                        int savederrno = errno;
 
-                                       (void)kill(preproc, SIGTERM);
+                                       kill(preproc, SIGTERM);
                                        errno = savederrno;
                                        err(EX_OSERR, "fdopen()");
                                }
index 7287d39..83b3df5 100644 (file)
@@ -18,7 +18,7 @@
  * NEW command line interface for IP firewall facility
  *
  * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.4.2.13 2003/05/27 22:21:11 gshapiro Exp $
- * $DragonFly: src/sbin/ipfw/ipfw2.c,v 1.5 2004/01/22 06:20:08 dillon Exp $
+ * $DragonFly: src/sbin/ipfw/ipfw2.c,v 1.6 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -3587,7 +3587,7 @@ ipfw_readfile(int ac, char *av[])
                        if ((f = fdopen(pipedes[0], "r")) == NULL) {
                                int savederrno = errno;
 
-                               (void)kill(preproc, SIGTERM);
+                               kill(preproc, SIGTERM);
                                errno = savederrno;
                                err(EX_OSERR, "fdopen()");
                        }
index f2d12f6..d2429ba 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1989, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)mknod.c 8.1 (Berkeley) 6/5/93
  * $FreeBSD: src/sbin/mknod/mknod.c,v 1.13 2000/01/06 17:51:46 obrien Exp $
- * $DragonFly: src/sbin/mknod/mknod.c,v 1.3 2003/09/28 14:39:18 hmp Exp $
+ * $DragonFly: src/sbin/mknod/mknod.c,v 1.4 2004/12/18 21:43:38 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -55,7 +55,7 @@ static void
 usage(void)
 {
 
-       (void)fprintf(stderr,
+       fprintf(stderr,
            "usage: mknod name [b | c] major minor [owner:group]\n");
        exit(1);
 }
index a385480..336e46c 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1980, 1989, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount.c 8.25 (Berkeley) 5/8/95
  * $FreeBSD: src/sbin/mount/mount.c,v 1.39.2.3 2001/08/01 08:26:23 obrien Exp $
- * $DragonFly: src/sbin/mount/mount.c,v 1.7 2004/08/09 20:15:23 dillon Exp $
+ * $DragonFly: src/sbin/mount/mount.c,v 1.8 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -295,7 +295,7 @@ main(int argc, char **argv)
                if (fscanf(mountdfp, "%d", &pid) == 1 &&
                     pid > 0 && kill(pid, SIGHUP) == -1 && errno != ESRCH)
                        err(1, "signal mountd");
-               (void)fclose(mountdfp);
+               fclose(mountdfp);
        }
 
        exit(rval);
@@ -375,7 +375,7 @@ mountfs(const char *vfstype, const char *spec, const char *name, int flags,
 #endif
 
        /* resolve the mountpoint with realpath(3) */
-       (void)checkpath(name, mntpath);
+       checkpath(name, mntpath);
        name = mntpath;
 
        if (mntopts == NULL)
@@ -413,10 +413,10 @@ mountfs(const char *vfstype, const char *spec, const char *name, int flags,
        argv[argc] = NULL;
 
        if (debug) {
-               (void)printf("exec: mount_%s", vfstype);
+               printf("exec: mount_%s", vfstype);
                for (i = 1; i < argc; i++)
-                       (void)printf(" %s", argv[i]);
-               (void)printf("\n");
+                       printf(" %s", argv[i]);
+               printf("\n");
                return (0);
        }
 
@@ -431,7 +431,7 @@ mountfs(const char *vfstype, const char *spec, const char *name, int flags,
 
                /* Go find an executable. */
                for (edir = edirs; *edir; edir++) {
-                       (void)snprintf(execname,
+                       snprintf(execname,
                            sizeof(execname), "%s/mount_%s", *edir, vfstype);
                        execv(execname, (char * const *)argv);
                }
@@ -491,31 +491,31 @@ prmount(struct statfs *sfp)
        struct opt *o;
        struct passwd *pw;
 
-       (void)printf("%s on %s (%s", sfp->f_mntfromname, sfp->f_mntonname,
+       printf("%s on %s (%s", sfp->f_mntfromname, sfp->f_mntonname,
            sfp->f_fstypename);
 
        flags = sfp->f_flags & MNT_VISFLAGMASK;
        for (o = optnames; flags && o->o_opt; o++)
                if (flags & o->o_opt) {
-                       (void)printf(", %s", o->o_name);
+                       printf(", %s", o->o_name);
                        flags &= ~o->o_opt;
                }
        if (sfp->f_owner) {
-               (void)printf(", mounted by ");
+               printf(", mounted by ");
                if ((pw = getpwuid(sfp->f_owner)) != NULL)
-                       (void)printf("%s", pw->pw_name);
+                       printf("%s", pw->pw_name);
                else
-                       (void)printf("%d", sfp->f_owner);
+                       printf("%d", sfp->f_owner);
        }
        if (verbose) {
                if (sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0)
-                       (void)printf(", writes: sync %ld async %ld",
+                       printf(", writes: sync %ld async %ld",
                            sfp->f_syncwrites, sfp->f_asyncwrites);
                if (sfp->f_syncreads != 0 || sfp->f_asyncreads != 0)
-                       (void)printf(", reads: sync %ld async %ld",
+                       printf(", reads: sync %ld async %ld",
                            sfp->f_syncreads, sfp->f_asyncreads);
        }
-       (void)printf(")\n");
+       printf(")\n");
 }
 
 struct statfs *
@@ -546,7 +546,7 @@ catopt(char *s0, const char *s1)
                i = strlen(s0) + strlen(s1) + 1 + 1;
                if ((cp = malloc(i)) == NULL)
                        errx(1, "malloc failed");
-               (void)snprintf(cp, i, "%s,%s", s0, s1);
+               snprintf(cp, i, "%s,%s", s0, s1);
        } else
                cp = strdup(s1);
 
@@ -662,7 +662,7 @@ void
 usage(void)
 {
 
-       (void)fprintf(stderr, "%s\n%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n%s\n",
 "usage: mount [-dfpruvw] [-o options] [-t ufs | external_type] special node",
 "       mount [-adfpruvw] [-o options] [-t ufs | external_type]",
 "       mount [-dfpruvw] special | node");
index 750aed8..cda3608 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_ufs.c     8.4 (Berkeley) 4/26/95
  * $FreeBSD: src/sbin/mount/mount_ufs.c,v 1.16.2.3 2001/08/01 08:27:29 obrien Exp $
- * $DragonFly: src/sbin/mount/mount_ufs.c,v 1.5 2003/11/01 17:16:00 drhodus Exp $
+ * $DragonFly: src/sbin/mount/mount_ufs.c,v 1.6 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -138,6 +138,6 @@ mount_ufs(int argc, char *const *argv)
 static void
 ufs_usage(void)
 {
-       (void)fprintf(stderr, "usage: mount_ufs [-o options] special node\n");
+       fprintf(stderr, "usage: mount_ufs [-o options] special node\n");
        exit(1);
 }
index 8850481..fb1229f 100644 (file)
@@ -40,7 +40,7 @@
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_cd9660.c  8.7 (Berkeley) 5/1/95
  * $FreeBSD: src/sbin/mount_cd9660/mount_cd9660.c,v 1.15.2.3 2001/03/14 12:05:01 bp Exp $
- * $DragonFly: src/sbin/mount_cd9660/mount_cd9660.c,v 1.3 2003/08/08 04:18:39 dillon Exp $
+ * $DragonFly: src/sbin/mount_cd9660/mount_cd9660.c,v 1.4 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/cdio.h>
@@ -128,8 +128,8 @@ main(int argc, char **argv)
         * Resolve the mountpoint with realpath(3) and remove unnecessary
         * slashes from the devicename if there are any.
         */
-       (void)checkpath(dir, mntpath);
-       (void)rmslashes(dev, dev);
+       checkpath(dir, mntpath);
+       rmslashes(dev, dev);
 
 #define DEFAULT_ROOTUID        -2
        /*
@@ -179,8 +179,8 @@ main(int argc, char **argv)
 void
 usage(void)
 {
-       (void)fprintf(stderr,
-               "usage: mount_cd9660 [-egrv] [-o options] [-s startsector] special node\n");
+       fprintf(stderr,
+           "usage: mount_cd9660 [-egrv] [-o options] [-s startsector] special node\n");
        exit(EX_USAGE);
 }
 
index e52d382..92afc62 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_lfs.c     8.3 (Berkeley) 3/27/94
  * $FreeBSD: src/sbin/mount_ext2fs/mount_ext2fs.c,v 1.11 1999/10/09 11:54:09 phk Exp $
- * $DragonFly: src/sbin/mount_ext2fs/mount_ext2fs.c,v 1.5 2003/11/01 17:16:00 drhodus Exp $
+ * $DragonFly: src/sbin/mount_ext2fs/mount_ext2fs.c,v 1.6 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -93,8 +93,8 @@ main(int argc, char **argv)
         * Resolve the mountpoint with realpath(3) and remove unnecessary
         * slashes from the devicename if there are any.
         */
-       (void)checkpath(fs_name, mntpath);
-       (void)rmslashes(args.fspec, args.fspec);
+       checkpath(fs_name, mntpath);
+       rmslashes(args.fspec, args.fspec);
 
 #define DEFAULT_ROOTUID        -2
        args.export.ex_root = DEFAULT_ROOTUID;
@@ -122,7 +122,7 @@ main(int argc, char **argv)
 void
 usage(void)
 {
-       (void)fprintf(stderr,
-               "usage: mount_ext2fs [-o options] special node\n");
+       fprintf(stderr,
+           "usage: mount_ext2fs [-o options] special node\n");
        exit(EX_USAGE);
 }
index 4cc4f9b..bd42e46 100644 (file)
@@ -29,7 +29,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/mount_hpfs/mount_hpfs.c,v 1.1 1999/12/09 19:09:15 semenu Exp $
- * $DragonFly: src/sbin/mount_hpfs/mount_hpfs.c,v 1.5 2003/11/01 17:16:00 drhodus Exp $
+ * $DragonFly: src/sbin/mount_hpfs/mount_hpfs.c,v 1.6 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/cdefs.h>
@@ -75,7 +75,7 @@ main(int argc, char **argv)
 #endif
 
        mntflags = set_gid = set_uid = set_mask = 0;
-       (void)memset(&args, '\0', sizeof(args));
+       memset(&args, '\0', sizeof(args));
 
        while ((c = getopt(argc, argv, "u:g:m:o:c:W:F")) !=  -1) {
                switch (c) {
index 49f24bf..2e2f672 100644 (file)
@@ -30,7 +30,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/mount_msdos/mount_msdos.c,v 1.19.2.1 2000/07/20 10:35:13 kris Exp $
- * $DragonFly: src/sbin/mount_msdos/mount_msdos.c,v 1.5 2003/11/01 17:16:00 drhodus Exp $
+ * $DragonFly: src/sbin/mount_msdos/mount_msdos.c,v 1.6 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -89,7 +89,7 @@ main(int argc, char **argv)
        struct vfsconf vfc;
 
        mntflags = set_gid = set_uid = set_mask = 0;
-       (void)memset(&args, '\0', sizeof(args));
+       memset(&args, '\0', sizeof(args));
        args.magic = MSDOSFS_ARGSMAGIC;
 
        while ((c = getopt(argc, argv, "sl9u:g:m:o:L:W:")) != -1) {
@@ -148,8 +148,8 @@ main(int argc, char **argv)
         * Resolve the mountpoint with realpath(3) and remove unnecessary
         * slashes from the devicename if there are any.
         */
-       (void)checkpath(dir, mntpath);
-       (void)rmslashes(dev, dev);
+       checkpath(dir, mntpath);
+       rmslashes(dev, dev);
 
        args.fspec = dev;
        args.export.ex_root = -2;       /* unchecked anyway on DOS fs */
index 4d29922..0b16a72 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_nfs.c     8.11 (Berkeley) 5/4/95
  * $FreeBSD: src/sbin/mount_nfs/mount_nfs.c,v 1.36.2.6 2003/05/13 14:45:40 trhodes Exp $
- * $DragonFly: src/sbin/mount_nfs/mount_nfs.c,v 1.8 2004/02/04 17:40:00 joerg Exp $
+ * $DragonFly: src/sbin/mount_nfs/mount_nfs.c,v 1.9 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -256,7 +256,7 @@ main(int argc, char **argv)
        uid_t last_ruid;
 
        last_ruid = -1;
-       (void)strcpy(realm, KRB_REALM);
+       strcpy(realm, KRB_REALM);
        if (sizeof (struct nfsrpc_nickverf) != RPCX_NICKVERF ||
            sizeof (struct nfsrpc_fullblock) != RPCX_FULLBLOCK ||
            ((char *)&ktick.kt) - ((char *)&ktick) != NFSX_UNSIGNED ||
@@ -335,7 +335,7 @@ main(int argc, char **argv)
                        break;
 #ifdef NFSKERB
                case 'm':
-                       (void)strncpy(realm, optarg, REALM_SZ - 1);
+                       strncpy(realm, optarg, REALM_SZ - 1);
                        realm[REALM_SZ - 1] = '\0';
                        break;
 #endif
@@ -456,7 +456,7 @@ main(int argc, char **argv)
                exit(1);
 
        /* resolve the mountpoint with realpath(3) */
-       (void)checkpath(name, mntpath);
+       checkpath(name, mntpath);
 
        error = getvfsbyname("nfs", &vfc);
        if (error && vfsisloadable("nfs")) {
@@ -500,8 +500,7 @@ main(int argc, char **argv)
                         */
                        if (ncd.ncd_authuid != last_ruid) {
                                char buf[512];
-                               (void)sprintf(buf, "%s%d",
-                                             TKT_ROOT, ncd.ncd_authuid);
+                               sprintf(buf, "%s%d", TKT_ROOT, ncd.ncd_authuid);
                                krb_set_tkt_string(buf);
                                last_ruid = ncd.ncd_authuid;
                        }
@@ -988,7 +987,7 @@ xdr_fh(XDR *xdrsp, register struct nfhret *np)
 void
 usage(void)
 {
-       (void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n%s\n%s\n",
 "usage: mount_nfs [-23KNPTUbcdilqs] [-D deadthresh] [-I readdirsize]",
 "                 [-L leaseterm] [-R retrycnt] [-a maxreadahead]",
 "                 [-g maxgroups] [-m realm] [-o options] [-r readsize]",
index 6a8678d..24ff1ad 100644 (file)
@@ -29,7 +29,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/mount_ntfs/mount_ntfs.c,v 1.3.2.2 2001/10/12 22:08:43 semenu Exp $
- * $DragonFly: src/sbin/mount_ntfs/mount_ntfs.c,v 1.6 2004/08/09 14:40:08 eirikn Exp $
+ * $DragonFly: src/sbin/mount_ntfs/mount_ntfs.c,v 1.7 2004/12/18 21:43:39 swildner Exp $
  *
  */
 
@@ -78,7 +78,7 @@ main(int argc, char **argv)
 #endif
 
        mntflags = set_gid = set_uid = set_mask = 0;
-       (void)memset(&args, '\0', sizeof(args));
+       memset(&args, '\0', sizeof(args));
 
        while ((c = getopt(argc, argv, "aiu:g:m:o:W:")) !=  -1) {
                switch (c) {
@@ -124,8 +124,8 @@ main(int argc, char **argv)
         * Resolve the mountpoint with realpath(3) and remove unnecessary 
         * slashes from the devicename if there are any.
         */
-       (void)checkpath(dir, mntpath);
-       (void)rmslashes(dev, dev);
+       checkpath(dir, mntpath);
+       rmslashes(dev, dev);
 
        args.fspec = dev;
        args.export.ex_root = 65534;    /* unchecked anyway on DOS fs */
index b885095..898cc4f 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_null.c    8.6 (Berkeley) 4/26/95
  * $FreeBSD: src/sbin/mount_null/mount_null.c,v 1.13 1999/10/09 11:54:11 phk Exp $
- * $DragonFly: src/sbin/mount_null/mount_null.c,v 1.5 2003/11/01 17:16:00 drhodus Exp $
+ * $DragonFly: src/sbin/mount_null/mount_null.c,v 1.6 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -87,8 +87,8 @@ main(int argc, char **argv)
                usage();
 
        /* resolve target and source with realpath(3) */
-       (void)checkpath(argv[0], target);
-       (void)checkpath(argv[1], source);
+       checkpath(argv[0], target);
+       checkpath(argv[1], source);
 
        if (subdir(target, source) || subdir(source, target))
                errx(EX_USAGE, "%s (%s) and %s are not distinct paths",
@@ -129,7 +129,7 @@ subdir(const char *p, const char *dir)
 static void
 usage(void)
 {
-       (void)fprintf(stderr,
-               "usage: mount_null [-o options] target_fs mount_point\n");
+       fprintf(stderr,
+           "usage: mount_null [-o options] target_fs mount_point\n");
        exit(1);
 }
index b0024b6..ffb0dc2 100644 (file)
@@ -37,7 +37,7 @@
  *     @(#)activate.c  8.3 (Berkeley) 4/28/95
  *
  * $FreeBSD: src/sbin/mount_portal/activate.c,v 1.7 1999/08/28 00:13:35 peter Exp $
- * $DragonFly: src/sbin/mount_portal/activate.c,v 1.3 2003/09/28 14:39:19 hmp Exp $
+ * $DragonFly: src/sbin/mount_portal/activate.c,v 1.4 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <errno.h>
@@ -148,7 +148,7 @@ static void send_reply(int so, int fd, int error)
        /*
         * Throw away the open file descriptor
         */
-       (void) close(fd);
+       close(fd);
 }
 
 void activate(qelem *q, int so)
index e80d08b..f643089 100644 (file)
@@ -37,7 +37,7 @@
  *     @(#)conf.c      8.2 (Berkeley) 3/27/94
  *
  * $FreeBSD: src/sbin/mount_portal/conf.c,v 1.8 1999/08/28 00:13:35 peter Exp $
- * $DragonFly: src/sbin/mount_portal/conf.c,v 1.3 2003/09/28 14:39:19 hmp Exp $
+ * $DragonFly: src/sbin/mount_portal/conf.c,v 1.4 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <errno.h>
@@ -295,7 +295,7 @@ void conf_read(qelem *q, char *conf)
                conf_file = conf;               /* XXX */
                readfp(q, fp);
                conf_file = 0;          /* XXX */
-               (void) fclose(fp);
+               fclose(fp);
        } else {
                syslog(LOG_ERR, "open config file \"%s\": %s", conf, strerror(errno));
        }
index f234ba6..5c22a17 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_portal.c  8.6 (Berkeley) 4/26/95
  * $FreeBSD: src/sbin/mount_portal/mount_portal.c,v 1.16 1999/10/09 11:54:11 phk Exp $
- * $DragonFly: src/sbin/mount_portal/mount_portal.c,v 1.4 2003/11/01 17:16:00 drhodus Exp $
+ * $DragonFly: src/sbin/mount_portal/mount_portal.c,v 1.5 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -131,7 +131,7 @@ main(int argc, char **argv)
        conf = argv[optind];
 
        /* resolve the mountpoint with realpath(3) */
-       (void)checkpath(argv[optind+1], mountpt);
+       checkpath(argv[optind+1], mountpt);
 
        /*
         * Construct the listening socket
@@ -149,14 +149,14 @@ main(int argc, char **argv)
                err(EX_OSERR, "socket");
        }
        um = umask(077);
-       (void) unlink(un.sun_path);
+       unlink(un.sun_path);
        if (bind(so, (struct sockaddr *) &un, sizeof(un)) < 0)
                err(1, NULL);
 
-       (void) unlink(un.sun_path);
-       (void) umask(um);
+       unlink(un.sun_path);
+       umask(um);
 
-       (void) listen(so, 5);
+       listen(so, 5);
 
        args.pa_socket = so;
        sprintf(tag, "portal:%d", getpid());
@@ -261,11 +261,11 @@ main(int argc, char **argv)
                        syslog(LOG_ERR, "fork: %s", strerror(errno));
                        break;
                case 0:
-                       (void) close(so);
+                       close(so);
                        activate(&q, so2);
                        exit(0);
                default:
-                       (void) close(so2);
+                       close(so2);
                        break;
                }
        }
@@ -276,7 +276,7 @@ main(int argc, char **argv)
 static void
 usage(void)
 {
-       (void)fprintf(stderr,
-               "usage: mount_portal [-o options] config mount-point\n");
+       fprintf(stderr,
+           "usage: mount_portal [-o options] config mount-point\n");
        exit(EX_USAGE);
 }
index d3d5fa3..8ad0f75 100644 (file)
@@ -37,7 +37,7 @@
  *     @(#)pt_file.c   8.3 (Berkeley) 7/3/94
  *
  * $FreeBSD: src/sbin/mount_portal/pt_file.c,v 1.8 1999/08/28 00:13:38 peter Exp $
- * $DragonFly: src/sbin/mount_portal/pt_file.c,v 1.3 2003/09/28 14:39:19 hmp Exp $
+ * $DragonFly: src/sbin/mount_portal/pt_file.c,v 1.4 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <errno.h>
@@ -86,7 +86,7 @@ int portal_file(struct portal_cred *pcr, char *key, char **v, int so, int *fdp)
                error = errno;
                syslog(LOG_ERR, "setcred: %s", strerror(error));
                if (fd >= 0) {
-                       (void) close(fd);
+                       close(fd);
                        fd = -1;
                }
        }
index f198364..97de472 100644 (file)
@@ -37,7 +37,7 @@
  *     @(#)pt_tcp.c    8.5 (Berkeley) 4/28/95
  *
  * $FreeBSD: src/sbin/mount_portal/pt_tcp.c,v 1.9 1999/08/28 00:13:38 peter Exp $
- * $DragonFly: src/sbin/mount_portal/pt_tcp.c,v 1.3 2003/09/28 14:39:19 hmp Exp $
+ * $DragonFly: src/sbin/mount_portal/pt_tcp.c,v 1.4 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <errno.h>
@@ -151,7 +151,7 @@ int portal_tcp(struct portal_cred *pcr, char *key, char **v, int kso, int *fdp)
                        *fdp = so;
                        return (0);
                }
-               (void) close(so);
+               close(so);
 
                ipp++;
        }
index 6495b35..d64015c 100644 (file)
@@ -38,7 +38,7 @@
  *
  *  @(#)pt_tcp.c  8.3 (Berkeley) 3/27/94
  *
- * $DragonFly: src/sbin/mount_portal/pt_tcplisten.c,v 1.3 2004/02/04 17:40:00 joerg Exp $
+ * $DragonFly: src/sbin/mount_portal/pt_tcplisten.c,v 1.4 2004/12/18 21:43:39 swildner Exp $
  * pt_tcp.c,v 1.1.1.1 1994/05/26 06:34:34 rgrimes Exp
  */
 
@@ -158,15 +158,15 @@ int portal_tcplisten(struct portal_cred *pcr, char *key, char **v, int kso,
                        listen(so, 1);
                        if ((sock = accept(so, (struct sockaddr *)0, (int *)0)) == -1) {
                                syslog(LOG_ERR, "accept: %m");
-                               (void) close(so);
+                               close(so);
                                return (errno);
                        }
                        *fdp = sock;
-                       (void) close(so);
+                       close(so);
                        return (0);
                }
                syslog(LOG_ERR, "bind: %m");
-               (void) close(so);
+               close(so);
                return (errno);
        }
 
@@ -185,14 +185,14 @@ int portal_tcplisten(struct portal_cred *pcr, char *key, char **v, int kso,
                        listen(so, 1);
                        if ((sock = accept(so, (struct sockaddr *)0, (int *)0)) == -1) {
                                syslog(LOG_ERR, "accept: %m");
-                               (void) close(so);
+                               close(so);
                                return (errno);
                        }
                        *fdp = sock;
-                       (void) close(so);
+                       close(so);
                        return (0);
                }
-               (void) close(so);
+               close(so);
 
                ipp++;
        }
index fd84e89..935ef5e 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * $FreeBSD: src/sbin/mount_std/mount_std.c,v 1.10.2.1 2001/07/30 10:30:07 dd Exp $
- * $DragonFly: src/sbin/mount_std/mount_std.c,v 1.4 2003/11/01 17:16:00 drhodus Exp $
+ * $DragonFly: src/sbin/mount_std/mount_std.c,v 1.5 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -110,7 +110,7 @@ main(int argc, char **argv)
                errx(EX_OSERR, "%s filesystem not available", fsname);
 
        /* resolve the mountpoint with realpath(3) */
-       (void)checkpath(argv[1], mntpath);
+       checkpath(argv[1], mntpath);
 
        if (mount(vfc.vfc_name, mntpath, mntflags, NULL))
                err(EX_OSERR, NULL);
@@ -120,8 +120,7 @@ main(int argc, char **argv)
 void
 usage(void)
 {
-       (void)fprintf(stderr,
-               "usage: mount_%s [-o options] what_to_mount mount_point\n",
-                     fsname);
+       fprintf(stderr,
+           "usage: mount_%s [-o options] what_to_mount mount_point\n", fsname);
        exit(EX_USAGE);
 }
index 58002c1..99bdac1 100644 (file)
@@ -40,7 +40,7 @@
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_cd9660.c  8.7 (Berkeley) 5/1/95
  * $FreeBSD: src/sbin/mount_cd9660/mount_cd9660.c,v 1.15.2.3 2001/03/14 12:05:01 bp Exp $
- * $DragonFly: src/sbin/mount_udf/mount_udf.c,v 1.2 2004/03/24 17:39:51 drhodus Exp $
+ * $DragonFly: src/sbin/mount_udf/mount_udf.c,v 1.3 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/cdio.h>
@@ -103,8 +103,8 @@ main(int argc, char **argv)
         * Resolve the mountpoint with realpath(3) and remove unnecessary
         * slashes from the devicename if there are any.
         */
-       (void)checkpath(dir, mntpath);
-       (void)rmslashes(dev, dev);
+       checkpath(dir, mntpath);
+       rmslashes(dev, dev);
 
 #define DEFAULT_ROOTUID        -2
        /*
@@ -134,7 +134,6 @@ main(int argc, char **argv)
 void
 usage(void)
 {
-       (void)fprintf(stderr,
-               "usage: mount_udf [-o options] special node\n");
+       fprintf(stderr, "usage: mount_udf [-o options] special node\n");
        exit(EX_USAGE);
 }
index 75f14b9..a21123a 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_umap.c    8.5 (Berkeley) 4/26/95
  * $FreeBSD: src/sbin/mount_umap/mount_umap.c,v 1.15 1999/10/09 11:54:13 phk Exp $
- * $DragonFly: src/sbin/mount_umap/Attic/mount_umap.c,v 1.6 2004/02/04 17:40:00 joerg Exp $
+ * $DragonFly: src/sbin/mount_umap/Attic/mount_umap.c,v 1.7 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -117,8 +117,8 @@ main(int argc, char **argv)
                usage();
 
        /* resolve both target and source with realpath(3) */
-       (void)checkpath(argv[0], source);
-       (void)checkpath(argv[1], target);
+       checkpath(argv[0], source);
+       checkpath(argv[1], target);
 
        /* Read in uid mapping data. */
        if ((fp = fopen(mapfile, "r")) == NULL)
@@ -146,7 +146,7 @@ main(int argc, char **argv)
                errx(EX_DATAERR,
                    "maximum number of entries is %d%s", MAPFILEENTRIES, not);
 #if 0
-       (void)printf("reading %d entries\n", nentries);
+       printf("reading %d entries\n", nentries);
 #endif
        for (count = 0; count < nentries; ++count) {
                if ((fscanf(fp, "%lu %lu\n",
@@ -193,7 +193,7 @@ main(int argc, char **argv)
                errx(EX_DATAERR,
                    "maximum number of entries is %d%s", GMAPFILEENTRIES, not);
 #if 0
-       (void)printf("reading %d group entries\n", gnentries);
+       printf("reading %d group entries\n", gnentries);
 #endif
 
        for (count = 0; count < gnentries; ++count)
@@ -234,7 +234,7 @@ main(int argc, char **argv)
 void
 usage(void)
 {
-       (void)fprintf(stderr,
+       fprintf(stderr,
 "usage: mount_umap [-o options] -u usermap -g groupmap target_fs mount_point\n");
        exit(EX_USAGE);
 }
index 4793352..5e7f417 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mount_union.c   8.5 (Berkeley) 3/27/94
  * $FreeBSD: src/sbin/mount_union/mount_union.c,v 1.12 1999/10/09 11:54:14 phk Exp $
- * $DragonFly: src/sbin/mount_union/mount_union.c,v 1.5 2003/11/01 17:16:01 drhodus Exp $
+ * $DragonFly: src/sbin/mount_union/mount_union.c,v 1.6 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -98,8 +98,8 @@ main(int argc, char **argv)
                usage();
 
        /* resolve both target and source with realpath(3) */
-       (void)checkpath(argv[0], target);
-       (void)checkpath(argv[1], source);
+       checkpath(argv[0], target);
+       checkpath(argv[1], source);
 
        if (subdir(target, source) || subdir(source, target))
                errx(EX_USAGE, "%s (%s) and %s (%s) are not distinct paths",
@@ -140,7 +140,7 @@ subdir(const char *p, const char *dir)
 void
 usage(void)
 {
-       (void)fprintf(stderr,
-               "usage: mount_union [-br] [-o options] target_fs mount_point\n");
+       fprintf(stderr,
+           "usage: mount_union [-br] [-o options] target_fs mount_point\n");
        exit(EX_USAGE);
 }
index 4d4bf0e..0889a18 100644 (file)
@@ -10,7 +10,7 @@
  * Ari Suutari <suutari@iki.fi>
  *
  * $FreeBSD: src/sbin/natd/natd.c,v 1.25.2.5 2002/02/01 09:18:32 ru Exp $
- * $DragonFly: src/sbin/natd/natd.c,v 1.5 2004/08/19 23:48:16 joerg Exp $
+ * $DragonFly: src/sbin/natd/natd.c,v 1.6 2004/12/18 21:43:39 swildner Exp $
  */
 
 #define SYSLOG_NAMES
@@ -1522,8 +1522,7 @@ SetupProtoRedirect(const char* parms)
 /*
  * Create aliasing link.
  */
-       (void)PacketAliasRedirectProto(localAddr, remoteAddr, publicAddr,
-                                      proto);
+       PacketAliasRedirectProto(localAddr, remoteAddr, publicAddr, proto);
 }
 
 void SetupAddressRedirect (const char* parms)
@@ -1685,5 +1684,5 @@ SetupPunchFW(const char *strValue)
                errx(1, "punch_fw: basenumber:count parameter required");
 
        PacketAliasSetFWBase(base, num);
-       (void)PacketAliasSetMode(PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW);
+       PacketAliasSetMode(PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW);
 }
index 866d2c2..7a59f2c 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)mkfs.c  8.11 (Berkeley) 5/3/95
  * $FreeBSD: src/sbin/newfs/mkfs.c,v 1.29.2.6 2001/09/21 19:15:21 dillon Exp $
- * $DragonFly: src/sbin/newfs/mkfs.c,v 1.8 2004/06/26 22:44:05 dillon Exp $
+ * $DragonFly: src/sbin/newfs/mkfs.c,v 1.9 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include "defs.h"
@@ -185,13 +185,13 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo, const char *mfscopy)
                int omask;
 
                mfs_ppid = getpid();
-               (void) signal(SIGUSR1, parentready);
+               signal(SIGUSR1, parentready);
                if ((i = fork())) {
                        if (i == -1)
                                err(10, "mfs");
                        if (mfscopy)
                            copyroot = FSCopy(&copyhlinks, mfscopy);
-                       (void) signal(SIGUSR1, started);
+                       signal(SIGUSR1, started);
                        kill(i, SIGUSR1);
                        if (waitpid(i, &status, 0) != -1 && WIFEXITED(status))
                                exit(WEXITSTATUS(status));
@@ -203,7 +203,7 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo, const char *mfscopy)
                        sigpause(1 << SIGUSR1);
                sigblock(omask);
 #ifdef STANDALONE
-               (void)malloc(0);
+               malloc(0);
 #else
                raise_data_limit();
 #endif
@@ -752,11 +752,11 @@ next:
         */
        if (mfs) {
                kill(mfs_ppid, SIGUSR1);
-               (void) setsid();
-               (void) close(0);
-               (void) close(1);
-               (void) close(2);
-               (void) chdir("/");
+               setsid();
+               close(0);
+               close(1);
+               close(2);
+               chdir("/");
        }
 }
 
@@ -979,12 +979,12 @@ fsinit(time_t utime)
         * create the lost+found directory
         */
        if (Oflag) {
-               (void)makedir((struct direct *)olost_found_dir, 2);
+               makedir((struct direct *)olost_found_dir, 2);
                for (i = DIRBLKSIZ; i < sblock.fs_bsize; i += DIRBLKSIZ)
                        memmove(&buf[i], &olost_found_dir[2],
                            DIRSIZ(0, &olost_found_dir[2]));
        } else {
-               (void)makedir(lost_found_dir, 2);
+               makedir(lost_found_dir, 2);
                for (i = DIRBLKSIZ; i < sblock.fs_bsize; i += DIRBLKSIZ)
                        memmove(&buf[i], &lost_found_dir[2],
                            DIRSIZ(0, &lost_found_dir[2]));
index 6b2d08a..b3bb8c6 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1983, 1989, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)newfs.c 8.13 (Berkeley) 5/1/95
  * $FreeBSD: src/sbin/newfs/newfs.c,v 1.30.2.9 2003/05/13 12:03:55 joerg Exp $
- * $DragonFly: src/sbin/newfs/newfs.c,v 1.10 2004/06/26 22:54:01 dillon Exp $
+ * $DragonFly: src/sbin/newfs/newfs.c,v 1.11 2004/12/18 21:43:39 swildner Exp $
  */
 
 /*
@@ -412,7 +412,7 @@ main(int argc, char **argv)
                /*
                 * No path prefix; try /dev/%s.
                 */
-               (void)snprintf(device, sizeof(device), "%s%s", _PATH_DEV, special);
+               snprintf(device, sizeof(device), "%s%s", _PATH_DEV, special);
                special = device;
        }
        if (Nflag) {
index ddf5760..1dedb88 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1989, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)nfsd.c  8.9 (Berkeley) 3/29/95
  * $FreeBSD: src/sbin/nfsd/nfsd.c,v 1.15.2.1 2000/09/16 22:52:23 brian Exp $
- * $DragonFly: src/sbin/nfsd/nfsd.c,v 1.6 2004/02/04 17:40:00 joerg Exp $
+ * $DragonFly: src/sbin/nfsd/nfsd.c,v 1.7 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -260,13 +260,13 @@ main(int argc, char **argv, char **envp)
 
        if (debug == 0) {
                daemon(0, 0);
-               (void)signal(SIGHUP, SIG_IGN);
-               (void)signal(SIGINT, SIG_IGN);
-               (void)signal(SIGQUIT, SIG_IGN);
-               (void)signal(SIGSYS, nonfs);
-               (void)signal(SIGTERM, SIG_IGN);
+               signal(SIGHUP, SIG_IGN);
+               signal(SIGINT, SIG_IGN);
+               signal(SIGQUIT, SIG_IGN);
+               signal(SIGSYS, nonfs);
+               signal(SIGTERM, SIG_IGN);
        }
-       (void)signal(SIGCHLD, reapchild);
+       signal(SIGCHLD, reapchild);
 
        if (reregister) {
                if (udpflag &&
@@ -326,7 +326,7 @@ main(int argc, char **argv, char **envp)
                            (RPCAUTH_MAXSIZ - 3 * NFSX_UNSIGNED)) {
                            kin.w1 = NFS_KERBW1(kt);
                            kt.mbz = 0;
-                           (void)strcpy(inst, "*");
+                           strcpy(inst, "*");
                            if (krb_rd_req(&kt, NFS_KERBSRV,
                                inst, nsd.nsd_haddr, &kauth, "") == RD_AP_OK &&
                                krb_kntoln(&kauth, lnam) == KSUCCESS &&
@@ -407,7 +407,7 @@ main(int argc, char **argv, char **envp)
                        syslog(LOG_ERR, "can't Add UDP socket");
                        exit(1);
                }
-               (void)close(sock);
+               close(sock);
        }
 
 #ifdef ISO
@@ -591,7 +591,7 @@ main(int argc, char **argv, char **envp)
                        nfsdargs.name = (caddr_t)&inetpeer;
                        nfsdargs.namelen = sizeof(inetpeer);
                        nfssvc(NFSSVC_ADDSOCK, &nfsdargs);
-                       (void)close(msgsock);
+                       close(msgsock);
                }
 #ifdef notyet
                if (tp4flag && FD_ISSET(tp4sock, &ready)) {
@@ -609,7 +609,7 @@ main(int argc, char **argv, char **envp)
                        nfsdargs.name = (caddr_t)&isopeer;
                        nfsdargs.namelen = len;
                        nfssvc(NFSSVC_ADDSOCK, &nfsdargs);
-                       (void)close(msgsock);
+                       close(msgsock);
                }
                if (tpipflag && FD_ISSET(tpipsock, &ready)) {
                        len = sizeof(inetpeer);
@@ -625,7 +625,7 @@ main(int argc, char **argv, char **envp)
                        nfsdargs.name = (caddr_t)&inetpeer;
                        nfsdargs.namelen = len;
                        nfssvc(NFSSVC_ADDSOCK, &nfsdargs);
-                       (void)close(msgsock);
+                       close(msgsock);
                }
 #endif /* notyet */
        }
@@ -656,7 +656,7 @@ setbindhost(struct sockaddr_in *ia, const char *bindhost)
 void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: nfsd %s\n", USAGE);
+       fprintf(stderr, "usage: nfsd %s\n", USAGE);
        exit(1);
 }
 
@@ -682,8 +682,8 @@ setproctitle(char *a)
        char buf[80];
 
        cp = Argv[0];
-       (void)snprintf(buf, sizeof(buf), "nfsd-%s", a);
-       (void)strncpy(cp, buf, LastArg - cp);
+       snprintf(buf, sizeof(buf), "nfsd-%s", a);
+       strncpy(cp, buf, LastArg - cp);
        cp += strlen(cp);
        while (cp < LastArg)
                *cp++ = '\0';
index 1e6f508..f2d25c9 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/nos-tun/nos-tun.c,v 1.6.2.2 2001/08/01 23:14:00 obrien Exp $
- * $DragonFly: src/sbin/nos-tun/nos-tun.c,v 1.4 2003/11/01 17:16:01 drhodus Exp $
+ * $DragonFly: src/sbin/nos-tun/nos-tun.c,v 1.5 2004/12/18 21:43:39 swildner Exp $
  */
 
 /*
@@ -313,9 +313,9 @@ int main (int argc, char **argv)
   daemon(0,0);
 
   /* Install signal handlers */
-  (void)signal(SIGHUP,Finish);
-  (void)signal(SIGINT,Finish);
-  (void)signal(SIGTERM,Finish);
+  signal(SIGHUP,Finish);
+  signal(SIGINT,Finish);
+  signal(SIGTERM,Finish);
 
   for (;;) {
     /* Set file descriptors for select() */
index 318ec11..63c82d4 100644 (file)
@@ -24,7 +24,7 @@
  * the rights to redistribute these changes.
  *
  * $FreeBSD: src/sbin/pc98/fdisk/fdisk.c,v 1.1.2.3 2000/12/11 01:03:25 obrien Exp $
- * $DragonFly: src/sbin/pc98/fdisk/Attic/fdisk.c,v 1.3 2003/09/28 14:39:20 hmp Exp $
+ * $DragonFly: src/sbin/pc98/fdisk/Attic/fdisk.c,v 1.4 2004/12/18 21:43:39 swildner Exp $
  */
 
 #include <sys/disklabel.h>
@@ -953,7 +953,7 @@ write_s0(void)
                return -1;
 #ifdef NOT_NOW
        flag = 0;
-       (void) ioctl(fd, DIOCWLABEL, &flag);
+       ioctl(fd, DIOCWLABEL, &flag);
 #endif
        }
        return(0);
index a03c57b..29ab83d 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1989, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)ping.c  8.1 (Berkeley) 6/5/93
  * $FreeBSD: src/sbin/ping/ping.c,v 1.52.2.13 2002/10/29 10:23:21 maxim Exp $
- * $DragonFly: src/sbin/ping/ping.c,v 1.3 2003/09/28 14:39:20 hmp Exp $
+ * $DragonFly: src/sbin/ping/ping.c,v 1.4 2004/12/18 21:43:39 swildner Exp $
  */
 
 /*
@@ -403,7 +403,7 @@ main(int argc, char **argv)
                                errx(1, "gethostbyname2: illegal address");
                        memcpy(&sin.sin_addr, hp->h_addr_list[0],
                            sizeof(sin.sin_addr));
-                       (void)strncpy(snamebuf, hp->h_name,
+                       strncpy(snamebuf, hp->h_name,
                            sizeof(snamebuf) - 1);
                        snamebuf[sizeof(snamebuf) - 1] = '\0';
                        shostname = snamebuf;
@@ -427,7 +427,7 @@ main(int argc, char **argv)
                if (hp->h_length > sizeof(to->sin_addr))
                        errx(1, "gethostbyname2 returned an illegal address");
                memcpy(&to->sin_addr, hp->h_addr_list[0], sizeof to->sin_addr);
-               (void)strncpy(hnamebuf, hp->h_name, sizeof(hnamebuf) - 1);
+               strncpy(hnamebuf, hp->h_name, sizeof(hnamebuf) - 1);
                hnamebuf[sizeof(hnamebuf) - 1] = '\0';
                hostname = hnamebuf;
        }
@@ -460,10 +460,10 @@ main(int argc, char **argv)
        }
        hold = 1;
        if (options & F_SO_DEBUG)
-               (void)setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)&hold,
+               setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)&hold,
                    sizeof(hold));
        if (options & F_SO_DONTROUTE)
-               (void)setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *)&hold,
+               setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *)&hold,
                    sizeof(hold));
 #ifdef IPSEC
 #ifdef IPSEC_POLICY_IPSEC
@@ -555,22 +555,20 @@ main(int argc, char **argv)
         * as well.
         */
        hold = IP_MAXPACKET + 128;
-       (void)setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&hold,
-           sizeof(hold));
+       setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&hold, sizeof(hold));
 
        if (!uid) {
-               (void)setsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *)&hold,
+               setsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *)&hold,
                    sizeof(hold));
        }
 
        if (to->sin_family == AF_INET) {
-               (void)printf("PING %s (%s)", hostname,
-                   inet_ntoa(to->sin_addr));
+               printf("PING %s (%s)", hostname, inet_ntoa(to->sin_addr));
                if (source)
-                       (void)printf(" from %s", shostname);
-               (void)printf(": %d data bytes\n", datalen);
+                       printf(" from %s", shostname);
+               printf(": %d data bytes\n", datalen);
        } else
-               (void)printf("PING %s: %d data bytes\n", hostname, datalen);
+               printf("PING %s: %d data bytes\n", hostname, datalen);
 
        /*
         * Use sigaction() instead of signal() to get unambiguous semantics,
@@ -620,7 +618,7 @@ main(int argc, char **argv)
                while (preload--)       /* fire off them quickies */
                        pinger();
        }
-       (void)gettimeofday(&last, NULL);
+       gettimeofday(&last, NULL);
 
        if (options & F_FLOOD) {
                intvl.tv_sec = 0;
@@ -641,7 +639,7 @@ main(int argc, char **argv)
                        errx(EX_OSERR, "descriptor too large");
                FD_ZERO(&rfds);
                FD_SET(s, &rfds);
-               (void)gettimeofday(&now, NULL);
+               gettimeofday(&now, NULL);
                timeout.tv_sec = last.tv_sec + intvl.tv_sec - now.tv_sec;
                timeout.tv_usec = last.tv_usec + intvl.tv_usec - now.tv_usec;
                while (timeout.tv_usec < 0) {
@@ -681,7 +679,7 @@ main(int argc, char **argv)
                        }
 #endif
                        if (t == 0) {
-                               (void)gettimeofday(&now, NULL);
+                               gettimeofday(&now, NULL);
                                t = &now;
                        }
                        pr_pack((char *)packet, cc, &from, t);
@@ -703,12 +701,12 @@ main(int argc, char **argv)
                                } else
                                        intvl.tv_sec = MAXWAIT;
                        }
-                       (void)gettimeofday(&last, NULL);
+                       gettimeofday(&last, NULL);
 
                        if (ntransmitted - nreceived - 1 > nmissedmax) {
                                nmissedmax = ntransmitted - nreceived - 1;
                                if (options & F_MISSED)
-                                       (void)write(STDOUT_FILENO, &BBELL, 1);
+                                       write(STDOUT_FILENO, &BBELL, 1);
                        }
                }
        }
@@ -754,7 +752,7 @@ pinger(void)
        CLR(icp->icmp_seq % mx_dup_ck);
 
        if (timing)
-               (void)gettimeofday((struct timeval *)&outpack[MINICMPLEN],
+               gettimeofday((struct timeval *)&outpack[MINICMPLEN],
                    (struct timezone *)NULL);
 
        cc = MINICMPLEN + datalen;
@@ -779,7 +777,7 @@ pinger(void)
        }
        ntransmitted++;
        if (!(options & F_QUIET) && options & F_FLOOD)
-               (void)write(STDOUT_FILENO, &DOT, 1);
+               write(STDOUT_FILENO, &DOT, 1);
 }
 
 /*
@@ -853,38 +851,38 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, struct timeval *tv)
                        return;
 
                if (options & F_FLOOD)
-                       (void)write(STDOUT_FILENO, &BSPACE, 1);
+                       write(STDOUT_FILENO, &BSPACE, 1);
                else {
-                       (void)printf("%d bytes from %s: icmp_seq=%u", cc,
+                       printf("%d bytes from %s: icmp_seq=%u", cc,
                           inet_ntoa(*(struct in_addr *)&from->sin_addr.s_addr),
                           icp->icmp_seq);
-                       (void)printf(" ttl=%d", ip->ip_ttl);
+                       printf(" ttl=%d", ip->ip_ttl);
                        if (timing)
-                               (void)printf(" time=%.3f ms", triptime);
+                               printf(" time=%.3f ms", triptime);
                        if (dupflag)
-                               (void)printf(" (DUP!)");
+                               printf(" (DUP!)");
                        if (options & F_AUDIBLE)
-                               (void)write(STDOUT_FILENO, &BBELL, 1);
+                               write(STDOUT_FILENO, &BBELL, 1);
                        /* check the data */
                        cp = (u_char*)&icp->icmp_data[PHDR_LEN];
                        dp = &outpack[MINICMPLEN + PHDR_LEN];
                        for (i = PHDR_LEN; i < datalen; ++i, ++cp, ++dp) {
                                if (*cp != *dp) {
-       (void)printf("\nwrong data byte #%d should be 0x%x but was 0x%x",
+       printf("\nwrong data byte #%d should be 0x%x but was 0x%x",
            i, *dp, *cp);
-                                       (void)printf("\ncp:");
+                                       printf("\ncp:");
                                        cp = (u_char*)&icp->icmp_data[0];
                                        for (i = 0; i < datalen; ++i, ++cp) {
                                                if ((i % 32) == 8)
-                                                       (void)printf("\n\t");
-                                               (void)printf("%x ", *cp);
+                                                       printf("\n\t");
+                                               printf("%x ", *cp);
                                        }
-                                       (void)printf("\ndp:");
+                                       printf("\ndp:");
                                        cp = &outpack[MINICMPLEN];
                                        for (i = 0; i < datalen; ++i, ++cp) {
                                                if ((i % 32) == 8)
-                                                       (void)printf("\n\t");
-                                               (void)printf("%x ", *cp);
+                                                       printf("\n\t");
+                                               printf("%x ", *cp);
                                        }
                                        break;
                                }
@@ -914,7 +912,7 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, struct timeval *tv)
                     (oip->ip_p == IPPROTO_ICMP) &&
                     (oicmp->icmp_type == ICMP_ECHO) &&
                     (oicmp->icmp_id == ident))) {
-                   (void)printf("%d bytes from %s: ", cc,
+                   printf("%d bytes from %s: ", cc,
                        pr_addr(from->sin_addr));
                    pr_icmph(icp);
                } else
@@ -930,7 +928,7 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, struct timeval *tv)
                        hlen = 0;
                        break;
                case IPOPT_LSRR:
-                       (void)printf("\nLSRR: ");
+                       printf("\nLSRR: ");
                        j = cp[IPOPT_OLEN] - IPOPT_MINOFF + 1;
                        hlen -= 2;
                        cp += 2;
@@ -939,19 +937,18 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, struct timeval *tv)
                                for (;;) {
                                        bcopy(++cp, &ina.s_addr, INADDR_LEN);
                                        if (ina.s_addr == 0)
-                                               (void)printf("\t0.0.0.0");
+                                               printf("\t0.0.0.0");
                                        else
-                                               (void)printf("\t%s",
-                                                    pr_addr(ina));
+                                               printf("\t%s", pr_addr(ina));
                                        hlen -= INADDR_LEN;
                                        cp += INADDR_LEN - 1;
                                        j -= INADDR_LEN;
                                        if (j < INADDR_LEN)
                                                break;
-                                       (void)putchar('\n');
+                                       putchar('\n');
                                }
                        } else
-                               (void)printf("\t(truncated route)\n");
+                               printf("\t(truncated route)\n");
                        break;
                case IPOPT_RR:
                        j = cp[IPOPT_OLEN];             /* get length */
@@ -968,7 +965,7 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, struct timeval *tv)
                        if (i == old_rrlen
                            && !bcmp((char *)cp, old_rr, i)
                            && !(options & F_FLOOD)) {
-                               (void)printf("\t(same route)");
+                               printf("\t(same route)");
                                hlen -= i;
                                cp += i;
                                break;
@@ -976,37 +973,36 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, struct timeval *tv)
                        old_rrlen = i;
                        bcopy((char *)cp, old_rr, i);
 
-                       (void)printf("\nRR: ");
+                       printf("\nRR: ");
 
                        if (i >= INADDR_LEN &&
                            i <= hlen - (int)sizeof(struct ip)) {
                                for (;;) {
                                        bcopy(++cp, &ina.s_addr, INADDR_LEN);
                                        if (ina.s_addr == 0)
-                                               (void)printf("\t0.0.0.0");
+                                               printf("\t0.0.0.0");
                                        else
-                                               (void)printf("\t%s",
-                                                    pr_addr(ina));
+                                               printf("\t%s", pr_addr(ina));
                                        hlen -= INADDR_LEN;
                                        cp += INADDR_LEN - 1;
                                        i -= INADDR_LEN;
                                        if (i < INADDR_LEN)
                                                break;
-                                       (void)putchar('\n');
+                                       putchar('\n');
                                }
                        } else
-                               (void)printf("\t(truncated route)");
+                               printf("\t(truncated route)");
                        break;
                case IPOPT_NOP:
-                       (void)printf("\nNOP");
+                       printf("\nNOP");
                        break;
                default:
-                       (void)printf("\nunknown option %x", *cp);
+                       printf("\nunknown option %x", *cp);
                        break;
                }
        if (!(options & F_FLOOD)) {
-               (void)putchar('\n');
-               (void)fflush(stdout);
+               putchar('\n');
+               fflush(stdout);
        }
 }
 
@@ -1087,7 +1083,7 @@ check_status(void)
 
        if (siginfo_p) {
                siginfo_p = 0;
-               (void)fprintf(stderr,
+               fprintf(stderr,
        "\r%ld/%ld packets received (%.0f%%) %.3f min / %.3f avg / %.3f max\n",
                    nreceived, ntransmitted,
                    ntransmitted ? nreceived * 100.0 / ntransmitted : 0.0,
@@ -1107,29 +1103,29 @@ finish(void)
 
        struct termios ts;
 
-       (void)signal(SIGINT, SIG_IGN);
-       (void)signal(SIGALRM, SIG_IGN);
-       (void)putchar('\n');
-       (void)fflush(stdout);
-       (void)printf("--- %s ping statistics ---\n", hostname);
-       (void)printf("%ld packets transmitted, ", ntransmitted);
-       (void)printf("%ld packets received, ", nreceived);
+       signal(SIGINT, SIG_IGN);
+       signal(SIGALRM, SIG_IGN);
+       putchar('\n');
+       fflush(stdout);
+       printf("--- %s ping statistics ---\n", hostname);
+       printf("%ld packets transmitted, ", ntransmitted);
+       printf("%ld packets received, ", nreceived);
        if (nrepeats)
-               (void)printf("+%ld duplicates, ", nrepeats);
+               printf("+%ld duplicates, ", nrepeats);
        if (ntransmitted) {
                if (nreceived > ntransmitted)
-                       (void)printf("-- somebody's printing up packets!");
+                       printf("-- somebody's printing up packets!");
                else
-                       (void)printf("%d%% packet loss",
+                       printf("%d%% packet loss",
                            (int)(((ntransmitted - nreceived) * 100) /
                            ntransmitted));
        }
-       (void)putchar('\n');
+       putchar('\n');
        if (nreceived && timing) {
                double n = nreceived + nrepeats;
                double avg = tsum / n;
                double vari = tsumsq / n - avg * avg;
-               (void)printf(
+               printf(
                    "round-trip min/avg/max/stddev = %.3f/%.3f/%.3f/%.3f ms\n",
                    tmin, avg, tmax, sqrt(vari));
        }
@@ -1170,35 +1166,35 @@ pr_icmph(struct icmp *icp)
 
        switch(icp->icmp_type) {
        case ICMP_ECHOREPLY:
-               (void)printf("Echo Reply\n");
+               printf("Echo Reply\n");
                /* XXX ID + Seq + Data */
                break;
        case ICMP_UNREACH:
                switch(icp->icmp_code) {
                case ICMP_UNREACH_NET:
-                       (void)printf("Destination Net Unreachable\n");
+                       printf("Destination Net Unreachable\n");
                        break;
                case ICMP_UNREACH_HOST:
-                       (void)printf("Destination Host Unreachable\n");
+                       printf("Destination Host Unreachable\n");
                        break;
                case ICMP_UNREACH_PROTOCOL:
-                       (void)printf("Destination Protocol Unreachable\n");
+                       printf("Destination Protocol Unreachable\n");
                        break;
                case ICMP_UNREACH_PORT:
-                       (void)printf("Destination Port Unreachable\n");
+                       printf("Destination Port Unreachable\n");
                        break;
                case ICMP_UNREACH_NEEDFRAG:
-                       (void)printf("frag needed and DF set (MTU %d)\n",
+                       printf("frag needed and DF set (MTU %d)\n",
                                        ntohs(icp->icmp_nextmtu));
                        break;
                case ICMP_UNREACH_SRCFAIL:
-                       (void)printf("Source Route Failed\n");
+                       printf("Source Route Failed\n");
                        break;
                case ICMP_UNREACH_FILTER_PROHIB:
-                       (void)printf("Communication prohibited by filter\n");
+                       printf("Communication prohibited by filter\n");
                        break;
                default:
-                       (void)printf("Dest Unreachable, Bad Code: %d\n",
+                       printf("Dest Unreachable, Bad Code: %d\n",
                            icp->icmp_code);
                        break;
                }
@@ -1210,7 +1206,7 @@ pr_icmph(struct icmp *icp)
 #endif
                break;
        case ICMP_SOURCEQUENCH:
-               (void)printf("Source Quench\n");
+               printf("Source Quench\n");
 #ifndef icmp_data
                pr_retip(&icp->icmp_ip);
 #else
@@ -1220,22 +1216,22 @@ pr_icmph(struct icmp *icp)
        case ICMP_REDIRECT:
                switch(icp->icmp_code) {
                case ICMP_REDIRECT_NET:
-                       (void)printf("Redirect Network");
+                       printf("Redirect Network");
                        break;
                case ICMP_REDIRECT_HOST:
-                       (void)printf("Redirect Host");
+                       printf("Redirect Host");
                        break;
                case ICMP_REDIRECT_TOSNET:
-                       (void)printf("Redirect Type of Service and Network");
+                       printf("Redirect Type of Service and Network");
                        break;
                case ICMP_REDIRECT_TOSHOST:
-                       (void)printf("Redirect Type of Service and Host");
+                       printf("Redirect Type of Service and Host");
                        break;
                default:
-                       (void)printf("Redirect, Bad Code: %d", icp->icmp_code);
+                       printf("Redirect, Bad Code: %d", icp->icmp_code);
                        break;
                }
-               (void)printf("(New addr: %s)\n", inet_ntoa(icp->icmp_gwaddr));
+               printf("(New addr: %s)\n", inet_ntoa(icp->icmp_gwaddr));
 #ifndef icmp_data
                pr_retip(&icp->icmp_ip);
 #else
@@ -1243,19 +1239,19 @@ pr_icmph(struct icmp *icp)
 #endif
                break;
        case ICMP_ECHO:
-               (void)printf("Echo Request\n");
+               printf("Echo Request\n");
                /* XXX ID + Seq + Data */
                break;
        case ICMP_TIMXCEED:
                switch(icp->icmp_code) {
                case ICMP_TIMXCEED_INTRANS:
-                       (void)printf("Time to live exceeded\n");
+                       printf("Time to live exceeded\n");
                        break;
                case ICMP_TIMXCEED_REASS:
-                       (void)printf("Frag reassembly time exceeded\n");
+                       printf("Frag reassembly time exceeded\n");
                        break;
                default:
-                       (void)printf("Time exceeded, Bad Code: %d\n",
+                       printf("Time exceeded, Bad Code: %d\n",
                            icp->icmp_code);
                        break;
                }
@@ -1266,7 +1262,7 @@ pr_icmph(struct icmp *icp)
 #endif
                break;
        case ICMP_PARAMPROB:
-               (void)printf("Parameter problem: pointer = 0x%02x\n",
+               printf("Parameter problem: pointer = 0x%02x\n",
                    icp->icmp_hun.ih_pptr);
 #ifndef icmp_data
                pr_retip(&icp->icmp_ip);
@@ -1275,35 +1271,35 @@ pr_icmph(struct icmp *icp)
 #endif
                break;
        case ICMP_TSTAMP:
-               (void)printf("Timestamp\n");
+               printf("Timestamp\n");
                /* XXX ID + Seq + 3 timestamps */
                break;
        case ICMP_TSTAMPREPLY:
-               (void)printf("Timestamp Reply\n");
+               printf("Timestamp Reply\n");
                /* XXX ID + Seq + 3 timestamps */
                break;
        case ICMP_IREQ:
-               (void)printf("Information Request\n");
+               printf("Information Request\n");
                /* XXX ID + Seq */
                break;
        case ICMP_IREQREPLY:
-               (void)printf("Information Reply\n");
+               printf("Information Reply\n");
                /* XXX ID + Seq */
                break;
        case ICMP_MASKREQ:
-               (void)printf("Address Mask Request\n");
+               printf("Address Mask Request\n");
                break;
        case ICMP_MASKREPLY:
-               (void)printf("Address Mask Reply\n");
+               printf("Address Mask Reply\n");
                break;
        case ICMP_ROUTERADVERT:
-               (void)printf("Router Advertisement\n");
+               printf("Router Advertisement\n");
                break;
        case ICMP_ROUTERSOLICIT:
-               (void)printf("Router Solicitation\n");
+               printf("Router Solicitation\n");
                break;
        default:
-               (void)printf("Bad ICMP type: %d\n", icp->icmp_type);
+               printf("Bad ICMP type: %d\n", icp->icmp_type);
        }
 }
 
@@ -1320,22 +1316,21 @@ pr_iph(struct ip *ip)
        hlen = ip->ip_hl << 2;
        cp = (u_char *)ip + 20;         /* point to options */
 
-       (void)printf("Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst\n");
-       (void)printf(" %1x  %1x  %02x %04x %04x",
+       printf("Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst\n");
+       printf(" %1x  %1x  %02x %04x %04x",
            ip->ip_v, ip->ip_hl, ip->ip_tos, ntohs(ip->ip_len),
            ntohs(ip->ip_id));
-       (void)printf("   %1lx %04lx",
+       printf("   %1lx %04lx",
            (u_long) (ntohl(ip->ip_off) & 0xe000) >> 13,
            (u_long) ntohl(ip->ip_off) & 0x1fff);
-       (void)printf("  %02x  %02x %04x", ip->ip_ttl, ip->ip_p,
-                                                           ntohs(ip->ip_sum));
-       (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_src.s_addr));
-       (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_dst.s_addr));
+       printf("  %02x  %02x %04x", ip->ip_ttl, ip->ip_p, ntohs(ip->ip_sum));
+       printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_src.s_addr));
+       printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_dst.s_addr));
        /* dump any option bytes */
        while (hlen-- > 20) {
-               (void)printf("%02x", *cp++);
+               printf("%02x", *cp++);
        }
-       (void)putchar('\n');
+       putchar('\n');
 }
 
 /*
@@ -1353,7 +1348,7 @@ pr_addr(struct in_addr ina)
            !(hp = gethostbyaddr((char *)&ina, 4, AF_INET)))
                return inet_ntoa(ina);
        else
-               (void)snprintf(buf, sizeof(buf), "%s (%s)", hp->h_name,
+               snprintf(buf, sizeof(buf), "%s (%s)", hp->h_name,
                    inet_ntoa(ina));
        return(buf);
 }
@@ -1373,10 +1368,10 @@ pr_retip(struct ip *ip)
        cp = (u_char *)ip + hlen;
 
        if (ip->ip_p == 6)
-               (void)printf("TCP: from port %u, to port %u (decimal)\n",
+               printf("TCP: from port %u, to port %u (decimal)\n",
                    (*cp * 256 + *(cp + 1)), (*(cp + 2) * 256 + *(cp + 3)));
        else if (ip->ip_p == 17)
-               (void)printf("UDP: from port %u, to port %u (decimal)\n",
+               printf("UDP: from port %u, to port %u (decimal)\n",
                        (*cp * 256 + *(cp + 1)), (*(cp + 2) * 256 + *(cp + 3)));
 }
 
@@ -1404,17 +1399,17 @@ fill(char *bp, char *patp)
                        for (jj = 0; jj < ii; ++jj)
                                bp[jj + kk] = pat[jj];
        if (!(options & F_QUIET)) {
-               (void)printf("PATTERN: 0x");
+               printf("PATTERN: 0x");
                for (jj = 0; jj < ii; ++jj)
-                       (void)printf("%02x", bp[jj] & 0xFF);
-               (void)printf("\n");
+                       printf("%02x", bp[jj] & 0xFF);
+               printf("\n");
        }
 }
 
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "%s\n%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n%s\n",
 "usage: ping [-AQRadfnqrv] [-c count] [-i wait] [-l preload] [-m ttl]",
 "            [-p pattern] "
 #ifdef IPSEC
index f2a5551..6cc5698 100644 (file)
@@ -31,7 +31,7 @@
  * @(#) Copyright (c) 1989, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)ping.c  8.1 (Berkeley) 6/5/93
  * $FreeBSD: src/sbin/ping6/ping6.c,v 1.4.2.10 2002/12/09 03:04:44 suz Exp $
- * $DragonFly: src/sbin/ping6/ping6.c,v 1.6 2004/02/04 17:40:01 joerg Exp $
+ * $DragonFly: src/sbin/ping6/ping6.c,v 1.7 2004/12/18 21:43:39 swildner Exp $
  */
 
 /*     BSDI    ping.c,v 2.3 1996/01/21 17:56:50 jch Exp        */
@@ -573,7 +573,7 @@ main(int argc, char **argv)
        if (!res->ai_addr)
                errx(1, "getaddrinfo failed");
 
-       (void)memcpy(&dst, res->ai_addr, res->ai_addrlen);
+       memcpy(&dst, res->ai_addr, res->ai_addrlen);
 
        if ((s = socket(res->ai_family, res->ai_socktype,
            res->ai_protocol)) < 0)
@@ -658,7 +658,7 @@ main(int argc, char **argv)
        hold = 1;
 
        if (options & F_SO_DEBUG)
-               (void)setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)&hold,
+               setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)&hold,
                    sizeof(hold));
        optval = IPV6_DEFHLIM;
        if (IN6_IS_ADDR_MULTICAST(&dst.sin6_addr))
@@ -968,18 +968,18 @@ main(int argc, char **argv)
        printf("%s\n", pr_addr((struct sockaddr *)&dst, sizeof(dst)));
 
        while (preload--)               /* Fire off them quickies. */
-               (void)pinger();
+               pinger();
 
-       (void)signal(SIGINT, onsignal);
+       signal(SIGINT, onsignal);
 #ifdef SIGINFO
-       (void)signal(SIGINFO, onsignal);
+       signal(SIGINFO, onsignal);
 #endif
 
        if ((options & F_FLOOD) == 0) {
-               (void)signal(SIGALRM, onsignal);
+               signal(SIGALRM, onsignal);
                itimer.it_interval = interval;
                itimer.it_value = interval;
-               (void)setitimer(ITIMER_REAL, &itimer, NULL);
+               setitimer(ITIMER_REAL, &itimer, NULL);
                if (ntransmitted == 0)
                        retransmit();
        }
@@ -1019,7 +1019,7 @@ main(int argc, char **argv)
 #endif
 
                if (options & F_FLOOD) {
-                       (void)pinger();
+                       pinger();
                        timeout.tv_sec = 0;
                        timeout.tv_usec = 10000;
                        tv = &timeout;
@@ -1132,8 +1132,8 @@ retransmit(void)
        itimer.it_interval.tv_usec = 0;
        itimer.it_value.tv_usec = 0;
 
-       (void)signal(SIGALRM, onint);
-       (void)setitimer(ITIMER_REAL, &itimer, NULL);
+       signal(SIGALRM, onint);
+       setitimer(ITIMER_REAL, &itimer, NULL);
 }
 
 /*
@@ -1241,7 +1241,7 @@ pinger(void)
                icp->icmp6_id = htons(ident);
                icp->icmp6_seq = ntohs(seq);
                if (timing)
-                       (void)gettimeofday((struct timeval *)
+                       gettimeofday((struct timeval *)
                                           &outpack[ICMP6ECHOLEN], NULL);
                cc = ICMP6ECHOLEN + datalen;
        }
@@ -1264,11 +1264,10 @@ pinger(void)
        if (i < 0 || i != cc)  {
                if (i < 0)
                        warn("sendmsg");
-               (void)printf("ping6: wrote %s %d chars, ret=%d\n",
-                   hostname, cc, i);
+               printf("ping6: wrote %s %d chars, ret=%d\n", hostname, cc, i);
        }
        if (!(options & F_QUIET) && options & F_FLOOD)
-               (void)write(STDOUT_FILENO, &DOT, 1);
+               write(STDOUT_FILENO, &DOT, 1);
 
        return(0);
 }
@@ -1379,7 +1378,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr)
        u_int16_t seq;
        char dnsname[MAXDNAME + 1];
 
-       (void)gettimeofday(&tv, NULL);
+       gettimeofday(&tv, NULL);
 
        if (!mhdr || !mhdr->msg_name ||
            mhdr->msg_namelen != sizeof(struct sockaddr_in6) ||
@@ -1440,11 +1439,11 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr)
                        return;
 
                if (options & F_FLOOD)
-                       (void)write(STDOUT_FILENO, &BSPACE, 1);
+                       write(STDOUT_FILENO, &BSPACE, 1);
                else {
-                       (void)printf("%d bytes from %s, icmp_seq=%u", cc,
+                       printf("%d bytes from %s, icmp_seq=%u", cc,
                            pr_addr(from, fromlen), seq);
-                       (void)printf(" hlim=%d", hoplim);
+                       printf(" hlim=%d", hoplim);
                        if ((options & F_VERBOSE) != 0) {
                                struct sockaddr_in6 dstsa;
 
@@ -1455,20 +1454,20 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr)
 #endif
                                dstsa.sin6_scope_id = pktinfo->ipi6_ifindex;
                                dstsa.sin6_addr = pktinfo->ipi6_addr;
-                               (void)printf(" dst=%s",
+                               printf(" dst=%s",
                                    pr_addr((struct sockaddr *)&dstsa,
                                    sizeof(dstsa)));
                        }
                        if (timing)
-                               (void)printf(" time=%g ms", triptime);
+                               printf(" time=%g ms", triptime);
                        if (dupflag)
-                               (void)printf("(DUP!)");
+                               printf("(DUP!)");
                        /* check the data */
                        cp = buf + off + ICMP6ECHOLEN + ICMP6ECHOTMLEN;
                        dp = outpack + ICMP6ECHOLEN + ICMP6ECHOTMLEN;
                        for (i = 8; cp < end; ++i, ++cp, ++dp) {
                                if (*cp != *dp) {
-                                       (void)printf("\nwrong data byte #%d should be 0x%x but was 0x%x", i, *dp, *cp);
+                                       printf("\nwrong data byte #%d should be 0x%x but was 0x%x", i, *dp, *cp);
                                        break;
                                }
                        }
@@ -1488,7 +1487,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr)
                if (options & F_QUIET)
                        return;
 
-               (void)printf("%d bytes from %s: ", cc, pr_addr(from, fromlen));
+               printf("%d bytes from %s: ", cc, pr_addr(from, fromlen));
 
                switch (ntohs(ni->ni_code)) {
                case ICMP6_NI_SUCCESS:
@@ -1555,15 +1554,15 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr)
                                int32_t ttl;
                                int comma = 0;
 
-                               (void)printf(" (");     /*)*/
+                               printf(" (");   /*)*/
 
                                switch (ni->ni_code) {
                                case ICMP6_NI_REFUSED:
-                                       (void)printf("refused");
+                                       printf("refused");
                                        comma++;
                                        break;
                                case ICMP6_NI_UNKNOWN:
-                                       (void)printf("unknwon qtype");
+                                       printf("unknwon qtype");
                                        comma++;
                                        break;
                                }
@@ -1578,14 +1577,12 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr)
                                if (comma)
                                        printf(",");
                                if (!(ni->ni_flags & NI_FQDN_FLAG_VALIDTTL)) {
-                                       (void)printf("TTL=%d:meaningless",
-                                           (int)ttl);
+                                       printf("TTL=%d:meaningless", (int)ttl);
                                } else {
                                        if (ttl < 0) {
-                                               (void)printf("TTL=%d:invalid",
-                                                  ttl);
+                                               printf("TTL=%d:invalid", ttl);
                                        } else
-                                               (void)printf("TTL=%d", ttl);
+                                               printf("TTL=%d", ttl);
                                }
                                comma++;
 
@@ -1608,7 +1605,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr)
                                    cc - off - ICMP6_NIRLEN - 1 && oldfqdn) {
                                        if (comma)
                                                printf(",");
-                                       (void)printf("invalid namelen:%d/%lu",
+                                       printf("invalid namelen:%d/%lu",
                                            buf[off + ICMP6_NIRLEN],
                                            (u_long)cc - off - ICMP6_NIRLEN - 1);
                                        comma++;
@@ -1623,15 +1620,15 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr)
                /* We've got something other than an ECHOREPLY */
                if (!(options & F_VERBOSE))
                        return;
-               (void)printf("%d bytes from %s: ", cc, pr_addr(from, fromlen));
+               printf("%d bytes from %s: ", cc, pr_addr(from, fromlen));
                pr_icmph(icp, end);
        }
 
        if (!(options & F_FLOOD)) {
-               (void)putchar('\n');
+               putchar('\n');
                if (options & F_VERBOSE)
                        pr_exthdrs(mhdr);
-               (void)fflush(stdout);
+               fflush(stdout);
        }
 #undef safeputc
 }
@@ -1896,14 +1893,14 @@ pr_nodeaddr(struct icmp6_nodeinfo *ni, int nilen)
        if (options & F_VERBOSE) {
                switch (ni->ni_code) {
                case ICMP6_NI_REFUSED:
-                       (void)printf("refused");
+                       printf("refused");
                        break;
                case ICMP6_NI_UNKNOWN:
-                       (void)printf("unknown qtype");
+                       printf("unknown qtype");
                        break;
                }
                if (ni->ni_flags & NI_NODEADDR_FLAG_TRUNCATE)
-                       (void)printf(" truncated");
+                       printf(" truncated");
        }
        putchar('\n');
        if (nilen <= 0)
@@ -2118,8 +2115,8 @@ tvsub(register struct timeval *out, register struct timeval *in)
 void
 onint(int notused)
 {
-       (void)signal(SIGINT, SIG_IGN);
-       (void)signal(SIGALRM, SIG_IGN);
+       signal(SIGINT, SIG_IGN);
+       signal(SIGALRM, SIG_IGN);
 
        summary();
 
@@ -2134,37 +2131,37 @@ void
 summary(void)
 {
 
-       (void)printf("\n--- %s ping6 statistics ---\n", hostname);
-       (void)printf("%ld packets transmitted, ", ntransmitted);
-       (void)printf("%ld packets received, ", nreceived);
+       printf("\n--- %s ping6 statistics ---\n", hostname);
+       printf("%ld packets transmitted, ", ntransmitted);
+       printf("%ld packets received, ", nreceived);
        if (nrepeats)
-               (void)printf("+%ld duplicates, ", nrepeats);
+               printf("+%ld duplicates, ", nrepeats);
        if (ntransmitted) {
                if (nreceived > ntransmitted)
-                       (void)printf("-- somebody's printing up packets!");
+                       printf("-- somebody's printing up packets!");
                else
-                       (void)printf("%d%% packet loss",
+                       printf("%d%% packet loss",
                            (int) (((ntransmitted - nreceived) * 100) /
                            ntransmitted));
        }
-       (void)putchar('\n');
+       putchar('\n');
        if (nreceived && timing) {
                /* Only display average to microseconds */
                double num = nreceived + nrepeats;
                double avg = tsum / num;
 #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
                double dev = sqrt(tsumsq / num - avg * avg);
-               (void)printf(
+               printf(
                    "round-trip min/avg/max/std-dev = %.3f/%.3f/%.3f/%.3f ms\n",
                    tmin, avg, tmax, dev);
 #else
-               (void)printf(
+               printf(
                    "round-trip min/avg/max = %.3f/%.3f/%.3f ms\n",
                    tmin, avg, tmax);
 #endif
-               (void)fflush(stdout);
+               fflush(stdout);
        }
-       (void)fflush(stdout);
+       fflush(stdout);
 }
 
 /*subject type*/
@@ -2198,23 +2195,22 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end)
        case ICMP6_DST_UNREACH:
                switch (icp->icmp6_code) {
                case ICMP6_DST_UNREACH_NOROUTE:
-                       (void)printf("No Route to Destination\n");
+                       printf("No Route to Destination\n");
                        break;
                case ICMP6_DST_UNREACH_ADMIN:
-                       (void)printf("Destination Administratively "
-                           "Unreachable\n");
+                       printf("Destination Administratively Unreachable\n");
                        break;
                case ICMP6_DST_UNREACH_BEYONDSCOPE:
-                       (void)printf("Destination Unreachable Beyond Scope\n");
+                       printf("Destination Unreachable Beyond Scope\n");
                        break;
                case ICMP6_DST_UNREACH_ADDR:
-                       (void)printf("Destination Host Unreachable\n");
+                       printf("Destination Host Unreachable\n");
                        break;
                case ICMP6_DST_UNREACH_NOPORT:
-                       (void)printf("Destination Port Unreachable\n");
+                       printf("Destination Port Unreachable\n");
                        break;
                default:
-                       (void)printf("Destination Unreachable, Bad Code: %d\n",
+                       printf("Destination Unreachable, Bad Code: %d\n",
                            icp->icmp6_code);
                        break;
                }
@@ -2222,110 +2218,109 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end)
                pr_retip((struct ip6_hdr *)(icp + 1), end);
                break;
        case ICMP6_PACKET_TOO_BIG:
-               (void)printf("Packet too big mtu = %d\n",
+               printf("Packet too big mtu = %d\n",
                    (int)ntohl(icp->icmp6_mtu));
                pr_retip((struct ip6_hdr *)(icp + 1), end);
                break;
        case ICMP6_TIME_EXCEEDED:
                switch (icp->icmp6_code) {
                case ICMP6_TIME_EXCEED_TRANSIT:
-                       (void)printf("Time to live exceeded\n");
+                       printf("Time to live exceeded\n");
                        break;
                case ICMP6_TIME_EXCEED_REASSEMBLY:
-                       (void)printf("Frag reassembly time exceeded\n");
+                       printf("Frag reassembly time exceeded\n");
                        break;
                default:
-                       (void)printf("Time exceeded, Bad Code: %d\n",
+                       printf("Time exceeded, Bad Code: %d\n",
                            icp->icmp6_code);
                        break;
                }
                pr_retip((struct ip6_hdr *)(icp + 1), end);
                break;
        case ICMP6_PARAM_PROB:
-               (void)printf("Parameter problem: ");
+               printf("Parameter problem: ");
                switch (icp->icmp6_code) {
                case ICMP6_PARAMPROB_HEADER:
-                       (void)printf("Erroneous Header ");
+                       printf("Erroneous Header ");
                        break;
                case ICMP6_PARAMPROB_NEXTHEADER:
-                       (void)printf("Unknown Nextheader ");
+                       printf("Unknown Nextheader ");
                        break;
                case ICMP6_PARAMPROB_OPTION:
-                       (void)printf("Unrecognized Option ");
+                       printf("Unrecognized Option ");
                        break;
                default:
-                       (void)printf("Bad code(%d) ", icp->icmp6_code);
+                       printf("Bad code(%d) ", icp->icmp6_code);
                        break;
                }
-               (void)printf("pointer = 0x%02x\n",
-                   (u_int32_t)ntohl(icp->icmp6_pptr));
+               printf("pointer = 0x%02x\n", (u_int32_t)ntohl(icp->icmp6_pptr));
                pr_retip((struct ip6_hdr *)(icp + 1), end);
                break;
        case ICMP6_ECHO_REQUEST:
-               (void)printf("Echo Request");
+               printf("Echo Request");
                /* XXX ID + Seq + Data */
                break;
        case ICMP6_ECHO_REPLY:
-               (void)printf("Echo Reply");
+               printf("Echo Reply");
                /* XXX ID + Seq + Data */
                break;
        case ICMP6_MEMBERSHIP_QUERY:
-               (void)printf("Listener Query");
+               printf("Listener Query");
                break;
        case ICMP6_MEMBERSHIP_REPORT:
-               (void)printf("Listener Report");
+               printf("Listener Report");
                break;
        case ICMP6_MEMBERSHIP_REDUCTION:
-               (void)printf("Listener Done");
+               printf("Listener Done");
                break;
        case ND_ROUTER_SOLICIT:
-               (void)printf("Router Solicitation");
+               printf("Router Solicitation");
                break;
        case ND_ROUTER_ADVERT:
-               (void)printf("Router Advertisement");
+               printf("Router Advertisement");
                break;
        case ND_NEIGHBOR_SOLICIT:
-               (void)printf("Neighbor Solicitation");
+               printf("Neighbor Solicitation");
                break;
        case ND_NEIGHBOR_ADVERT:
-               (void)printf("Neighbor Advertisement");
+               printf("Neighbor Advertisement");
                break;
        case ND_REDIRECT:
                red = (struct nd_redirect *)icp;
-               (void)printf("Redirect\n");
+               printf("Redirect\n");
                if (!inet_ntop(AF_INET6, &red->nd_rd_dst, ntop_buf,
                    sizeof(ntop_buf)))
                        strncpy(ntop_buf, "?", sizeof(ntop_buf));
-               (void)printf("Destination: %s", ntop_buf);
+               printf("Destination: %s", ntop_buf);
                if (!inet_ntop(AF_INET6, &red->nd_rd_target, ntop_buf,
                    sizeof(ntop_buf)))
                        strncpy(ntop_buf, "?", sizeof(ntop_buf));
-               (void)printf(" New Target: %s", ntop_buf);
+               printf(" New Target: %s", ntop_buf);
                break;
        case ICMP6_NI_QUERY:
-               (void)printf("Node Information Query");
+               printf("Node Information Query");
                /* XXX ID + Seq + Data */
                ni = (struct icmp6_nodeinfo *)icp;
                l = end - (u_char *)(ni + 1);
                printf(", ");
                switch (ntohs(ni->ni_qtype)) {
                case NI_QTYPE_NOOP:
-                       (void)printf("NOOP");
+                       printf("NOOP");
                        break;
                case NI_QTYPE_SUPTYPES:
-                       (void)printf("Supported qtypes");
+                       printf("Supported qtypes");
                        break;
                case NI_QTYPE_FQDN:
-                       (void)printf("DNS name");
+                       printf("DNS name");
                        break;
                case NI_QTYPE_NODEADDR:
-                       (void)printf("nodeaddr");
+                       printf("nodeaddr");
                        break;
                case NI_QTYPE_IPV4ADDR:
-                       (void)printf("IPv4 nodeaddr");
+                       printf("IPv4 nodeaddr");
                        break;
                default:
-                       (void)printf("unknown qtype");
+                       printf("unknown qtype");
                        break;
                }
                if (options & F_VERBOSE) {
@@ -2334,20 +2329,20 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end)
                                if (l == sizeof(struct in6_addr) &&
                                    inet_ntop(AF_INET6, ni + 1, ntop_buf,
                                    sizeof(ntop_buf)) != NULL) {
-                                       (void)printf(", subject=%s(%s)",
+                                       printf(", subject=%s(%s)",
                                            niqcode[ni->ni_code], ntop_buf);
                                } else {
 #if 1
                                        /* backward compat to -W */
-                                       (void)printf(", oldfqdn");
+                                       printf(", oldfqdn");
 #else
-                                       (void)printf(", invalid");
+                                       printf(", invalid");
 #endif
                                }
                                break;
                        case ICMP6_NI_SUBJ_FQDN:
                                if (end == (u_char *)(ni + 1)) {
-                                       (void)printf(", no subject");
+                                       printf(", no subject");
                                        break;
                                }
                                printf(", subject=%s", niqcode[ni->ni_code]);
@@ -2362,40 +2357,40 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end)
                                if (l == sizeof(struct in_addr) &&
                                    inet_ntop(AF_INET, ni + 1, ntop_buf,
                                    sizeof(ntop_buf)) != NULL) {
-                                       (void)printf(", subject=%s(%s)",
+                                       printf(", subject=%s(%s)",
                                            niqcode[ni->ni_code], ntop_buf);
                                } else
-                                       (void)printf(", invalid");
+                                       printf(", invalid");
                                break;
                        default:
-                               (void)printf(", invalid");
+                               printf(", invalid");
                                break;
                        }
                }
                break;
        case ICMP6_NI_REPLY:
-               (void)printf("Node Information Reply");
+               printf("Node Information Reply");
                /* XXX ID + Seq + Data */
                ni = (struct icmp6_nodeinfo *)icp;
                printf(", ");
                switch (ntohs(ni->ni_qtype)) {
                case NI_QTYPE_NOOP:
-                       (void)printf("NOOP");
+                       printf("NOOP");
                        break;
                case NI_QTYPE_SUPTYPES:
-                       (void)printf("Supported qtypes");
+                       printf("Supported qtypes");
                        break;
                case NI_QTYPE_FQDN:
-                       (void)printf("DNS name");
+                       printf("DNS name");
                        break;
                case NI_QTYPE_NODEADDR:
-                       (void)printf("nodeaddr");
+                       printf("nodeaddr");
                        break;
                case NI_QTYPE_IPV4ADDR:
-                       (void)printf("IPv4 nodeaddr");
+                       printf("IPv4 nodeaddr");
                        break;
                default:
-                       (void)printf("unknown qtype");
+                       printf("unknown qtype");
                        break;
                }
                if (options & F_VERBOSE) {
@@ -2406,7 +2401,7 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end)
                }
                break;
        default:
-               (void)printf("Bad ICMP type: %d", icp->icmp6_type);
+               printf("Bad ICMP type: %d", icp->icmp6_type);
        }
 }
 
@@ -2570,10 +2565,10 @@ fill(char *bp, char *patp)
                        for (jj = 0; jj < ii; ++jj)
                                bp[jj + kk] = pat[jj];
        if (!(options & F_QUIET)) {
-               (void)printf("PATTERN: 0x");
+               printf("PATTERN: 0x");
                for (jj = 0; jj < ii; ++jj)
-                       (void)printf("%02x", bp[jj] & 0xFF);
-               (void)printf("\n");
+                       printf("%02x", bp[jj] & 0xFF);
+               printf("\n");
        }
 }
 
@@ -2647,7 +2642,7 @@ nigroup(char *name)
 void
 usage(void)
 {
-       (void)fprintf(stderr,
+       fprintf(stderr,
            "usage: ping6 [-dfH"
 #ifdef IPV6_USE_MIN_MTU
            "m"
index e594be3..11c931e 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1980, 1990, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)quotacheck.c    8.3 (Berkeley) 1/29/94
  * $FreeBSD: src/sbin/quotacheck/quotacheck.c,v 1.11 1999/08/28 00:14:01 peter Exp $
- * $DragonFly: src/sbin/quotacheck/quotacheck.c,v 1.6 2004/08/30 19:27:21 eirikn Exp $
+ * $DragonFly: src/sbin/quotacheck/quotacheck.c,v 1.7 2004/12/18 21:43:40 swildner Exp $
  */
 
 /*
@@ -162,13 +162,13 @@ main(int argc, char **argv)
        if (gflag) {
                setgrent();
                while ((gr = getgrent()) != NULL)
-                       (void) addid((u_long)gr->gr_gid, GRPQUOTA, gr->gr_name);
+                       addid((u_long)gr->gr_gid, GRPQUOTA, gr->gr_name);
                endgrent();
        }
        if (uflag) {
                setpwent();
                while ((pw = getpwent()) != NULL)
-                       (void) addid((u_long)pw->pw_uid, USRQUOTA, pw->pw_name);
+                       addid((u_long)pw->pw_uid, USRQUOTA, pw->pw_name);
                endpwent();
        }
        if (aflag)
@@ -195,7 +195,7 @@ main(int argc, char **argv)
 void
 usage(void)
 {
-       (void)fprintf(stderr, "%s\n%s\n", 
+       fprintf(stderr, "%s\n%s\n", 
                "usage: quotacheck -a [-guv]",
                "       quotacheck [-guv] filesys ...");
        exit(1);
@@ -243,13 +243,13 @@ chkquota(char *fsname, char *mntpt, register struct quotaname *qnp)
                return (1);
        }
        if (vflag) {
-               (void)printf("*** Checking ");
+               printf("*** Checking ");
                if (qnp->flags & HASUSR)
-                       (void)printf("%s%s", qfextension[USRQUOTA],
+                       printf("%s%s", qfextension[USRQUOTA],
                            (qnp->flags & HASGRP) ? " and " : "");
                if (qnp->flags & HASGRP)
-                       (void)printf("%s", qfextension[GRPQUOTA]);
-               (void)printf(" quotas for %s (%s)\n", fsname, mntpt);
+                       printf("%s", qfextension[GRPQUOTA]);
+               printf(" quotas for %s (%s)\n", fsname, mntpt);
        }
        sync();
        dev_bsize = 1;
@@ -313,8 +313,8 @@ update(char *fsname, char *quotafile, register int type)
                if (qfo) {
                        warnx("creating quota file %s", quotafile);
 #define        MODE    (S_IRUSR|S_IWUSR|S_IRGRP)
-                       (void) fchown(fileno(qfo), getuid(), getquotagid());
-                       (void) fchmod(fileno(qfo), MODE);
+                       fchown(fileno(qfo), getuid(), getquotagid());
+                       fchmod(fileno(qfo), MODE);
                } else {
                        warn("%s", quotafile);
                        return (1);
@@ -322,13 +322,13 @@ update(char *fsname, char *quotafile, register int type)
        }
        if ((qfi = fopen(quotafile, "r")) == NULL) {
                warn("%s", quotafile);
-               (void) fclose(qfo);
+               fclose(qfo);
                return (1);
        }
        if (quotactl(fsname, QCMD(Q_SYNC, type), (u_long)0, (caddr_t)0) < 0 &&
            errno == EOPNOTSUPP && !warned && vflag) {
                warned++;
-               (void)printf("*** Warning: %s\n",
+               printf("*** Warning: %s\n",
                    "Quotas are not compiled into this kernel");
        }
        for (lastid = highid[type], id = 0, offset = 0; id <= lastid; 
@@ -348,14 +348,14 @@ update(char *fsname, char *quotafile, register int type)
                                printf("%s: ", fsname);
                        printf("%-8s fixed:", fup->fu_name);
                        if (dqbuf.dqb_curinodes != fup->fu_curinodes)
-                               (void)printf("\tinodes %lu -> %lu",
+                               printf("\tinodes %lu -> %lu",
                                    (u_long)dqbuf.dqb_curinodes,
                                    (u_long)fup->fu_curinodes);
                        if (dqbuf.dqb_curblocks != fup->fu_curblocks)
-                               (void)printf("\tblocks %lu -> %lu",
+                               printf("\tblocks %lu -> %lu",
                                    (u_long)dqbuf.dqb_curblocks,
                                    (u_long)fup->fu_curblocks);
-                       (void)printf("\n");
+                       printf("\n");
                }
                /*
                 * Reset time limit if have a soft limit and were
@@ -376,7 +376,7 @@ update(char *fsname, char *quotafile, register int type)
                        return(1);
                }
                fwrite((char *)&dqbuf, sizeof(struct dqblk), 1, qfo);
-               (void) quotactl(fsname, QCMD(Q_SETUSE, type), id,
+               quotactl(fsname, QCMD(Q_SETUSE, type), id,
                    (caddr_t)&dqbuf);
                fup->fu_curinodes = 0;
                fup->fu_curblocks = 0;
@@ -428,9 +428,9 @@ hasquota(register struct fstab *fs, int type, char **qfnamep)
        static char buf[BUFSIZ];
 
        if (!initname) {
-               (void)snprintf(usrname, sizeof(usrname),
+               snprintf(usrname, sizeof(usrname),
                    "%s%s", qfextension[USRQUOTA], qfname);
-               (void)snprintf(grpname, sizeof(grpname),
+               snprintf(grpname, sizeof(grpname),
                    "%s%s", qfextension[GRPQUOTA], qfname);
                initname = 1;
        }
@@ -448,7 +448,7 @@ hasquota(register struct fstab *fs, int type, char **qfnamep)
        if (cp)
                *qfnamep = cp;
        else {
-               (void)snprintf(buf, sizeof(buf),
+               snprintf(buf, sizeof(buf),
                    "%s/%s.%s", fs->fs_file, qfname, qfextension[type]);
                *qfnamep = buf;
        }
@@ -497,7 +497,7 @@ addid(u_long id, int type, char *name)
        if (name)
                bcopy(name, fup->fu_name, len + 1);
        else {
-               (void)sprintf(fup->fu_name, "%lu", id);
+               sprintf(fup->fu_name, "%lu", id);
                if (vflag) 
                        printf("unknown %cid: %lu\n", 
                            type == USRQUOTA ? 'u' : 'g', id);
index 910e2fe..c28a420 100644 (file)
@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  * $NetBSD: hash.c,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $
- * $DragonFly: src/sbin/rcorder/hash.c,v 1.4 2004/12/01 19:44:53 liamfoy Exp $
+ * $DragonFly: src/sbin/rcorder/hash.c,v 1.5 2004/12/18 21:43:40 swildner Exp $
  */
 
 #ifdef MAKE_BOOTSTRAP
@@ -263,7 +263,7 @@ Hash_CreateEntry(Hash_Table *t, char *key, Boolean *newPtr)
        *hp = e;
        e->clientData = NULL;
        e->namehash = h;
-       (void) strcpy(e->name, p);
+       strcpy(e->name, p);
        t->numEntries++;
 
        if (newPtr != NULL)
@@ -304,7 +304,7 @@ Hash_DeleteEntry(Hash_Table *t, Hash_Entry *e)
                        return;
                }
        }
-       (void)write(2, "bad call to Hash_DeleteEntry\n", 29);
+       write(2, "bad call to Hash_DeleteEntry\n", 29);
        abort();
 }
 
index 71bf496..d91e987 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1980, 1986, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)reboot.c        8.1 (Berkeley) 6/5/93
  * $FreeBSD: src/sbin/reboot/reboot.c,v 1.9.2.4 2002/04/28 22:50:00 wes Exp $
- * $DragonFly: src/sbin/reboot/reboot.c,v 1.4 2004/08/30 19:27:21 eirikn Exp $
+ * $DragonFly: src/sbin/reboot/reboot.c,v 1.5 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include <sys/reboot.h>
@@ -116,9 +116,9 @@ main(int argc, char *argv[])
        if (kflag) {
                fd = open("/boot/nextboot.conf", O_WRONLY | O_CREAT, 0444);
                if (fd > -1) {
-                       (void)write(fd, "kernel=\"", 8L);
-                       (void)write(fd, kernel, strlen(kernel));
-                       (void)write(fd, "\"\n", 2);
+                       write(fd, "kernel=\"", 8L);
+                       write(fd, kernel, strlen(kernel));
+                       write(fd, "\"\n", 2);
                        close(fd);
                }
        }
@@ -151,7 +151,7 @@ main(int argc, char *argv[])
                err(1, "SIGTSTP init");
 
        /* Ignore the SIGHUP we get when our parent shell dies. */
-       (void)signal(SIGHUP, SIG_IGN);
+       signal(SIGHUP, SIG_IGN);
 
        /* Send a SIGTERM first, a chance to save the buffers. */
        if (kill(-1, SIGTERM) == -1)
@@ -181,11 +181,11 @@ main(int argc, char *argv[])
                        goto restart;
                }
                if (i > 5) {
-                       (void)fprintf(stderr,
+                       fprintf(stderr,
                            "WARNING: some process(es) wouldn't die\n");
                        break;
                }
-               (void)sleep(2 * i);
+               sleep(2 * i);
        }
 
        reboot(howto);
@@ -201,7 +201,7 @@ restart:
 void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: %s [-dnpq] [-k kernel]\n",
+       fprintf(stderr, "usage: %s [-dnpq] [-k kernel]\n",
            dohalt ? "halt" : "reboot");
        exit(1);
 }
index 438e52b..8eac115 100644 (file)
@@ -37,7 +37,7 @@
  *
  * @(#)dirs.c  8.7 (Berkeley) 5/1/95
  * $FreeBSD: src/sbin/restore/dirs.c,v 1.14.2.5 2001/10/15 13:44:45 dd Exp $
- * $DragonFly: src/sbin/restore/dirs.c,v 1.6 2004/02/04 17:40:01 joerg Exp $
+ * $DragonFly: src/sbin/restore/dirs.c,v 1.7 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -175,20 +175,20 @@ extractdirs(int genmode)
        nulldir.d_ino = 0;
        nulldir.d_type = DT_DIR;
        nulldir.d_namlen = 1;
-       (void) strcpy(nulldir.d_name, "/");
+       strcpy(nulldir.d_name, "/");
        nulldir.d_reclen = DIRSIZ(0, &nulldir);
        for (;;) {
                curfile.name = "<directory file - name unknown>";
                curfile.action = USING;
                ip = curfile.dip;
                if (ip == NULL || (ip->di_mode & IFMT) != IFDIR) {
-                       (void) fclose(df);
+                       fclose(df);
                        dirp = opendirfile(dirfile);
                        if (dirp == NULL)
                                fprintf(stderr, "opendirfile: %s\n",
                                    strerror(errno));
                        if (mf != NULL)
-                               (void) fclose(mf);
+                               fclose(mf);
                        i = dirlookup(dot);
                        if (i == 0)
                                panic("Root directory is not on tape\n");
@@ -232,7 +232,7 @@ treescan(char *pname, ino_t ino, long (*todo) (char *, ino_t, int))
                /*
                 * Pname is name of a simple file or an unchanged directory.
                 */
-               (void) (*todo)(pname, ino, LEAF);
+               (*todo)(pname, ino, LEAF);
                return;
        }
        /*
@@ -244,9 +244,9 @@ treescan(char *pname, ino_t ino, long (*todo) (char *, ino_t, int))
         * begin search through the directory
         * skipping over "." and ".."
         */
-       (void) strncpy(locname, pname, sizeof(locname) - 1);
+       strncpy(locname, pname, sizeof(locname) - 1);
        locname[sizeof(locname) - 1] = '\0';
-       (void) strncat(locname, "/", sizeof(locname) - strlen(locname));
+       strncat(locname, "/", sizeof(locname) - strlen(locname));
        namelen = strlen(locname);
        rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
        dp = rst_readdir(dirp); /* "." */
@@ -270,7 +270,7 @@ treescan(char *pname, ino_t ino, long (*todo) (char *, ino_t, int))
                        fprintf(stderr, "%s%s: name exceeds %d char\n",
                                locname, dp->d_name, sizeof(locname) - 1);
                } else {
-                       (void) strncat(locname, dp->d_name, (int)dp->d_namlen);
+                       strncat(locname, dp->d_name, (int)dp->d_namlen);
                        treescan(locname, dp->d_ino, todo);
                        rst_seekdir(dirp, bpt, itp->t_seekpt);
                }
@@ -407,7 +407,7 @@ putent(struct direct *dp)
        if (dirloc + dp->d_reclen > DIRBLKSIZ) {
                ((struct direct *)(dirbuf + prev))->d_reclen =
                    DIRBLKSIZ - prev;
-               (void) fwrite(dirbuf, 1, DIRBLKSIZ, df);
+               fwrite(dirbuf, 1, DIRBLKSIZ, df);
                dirloc = 0;
        }
        memmove(dirbuf + dirloc, dp, (long)dp->d_reclen);
@@ -422,7 +422,7 @@ static void
 flushent(void)
 {
        ((struct direct *)(dirbuf + prev))->d_reclen = DIRBLKSIZ - prev;
-       (void) fwrite(dirbuf, (int)dirloc, 1, df);
+       fwrite(dirbuf, (int)dirloc, 1, df);
        seekpt = ftell(df);
        dirloc = 0;
 }
@@ -434,7 +434,7 @@ dcvt(register struct odirect *odp, register struct direct *ndp)
        memset(ndp, 0, (long)(sizeof *ndp));
        ndp->d_ino =  odp->d_ino;
        ndp->d_type = DT_UNKNOWN;
-       (void) strncpy(ndp->d_name, odp->d_name, ODIRSIZ);
+       strncpy(ndp->d_name, odp->d_name, ODIRSIZ);
        ndp->d_namlen = strlen(ndp->d_name);
        ndp->d_reclen = DIRSIZ(0, ndp);
 }
@@ -455,7 +455,7 @@ rst_seekdir(register RST_DIR *dirp, long loc, long base)
        loc -= base;
        if (loc < 0)
                fprintf(stderr, "bad seek pointer to rst_seekdir %ld\n", loc);
-       (void) lseek(dirp->dd_fd, base + (loc & ~(DIRBLKSIZ - 1)), SEEK_SET);
+       lseek(dirp->dd_fd, base + (loc & ~(DIRBLKSIZ - 1)), SEEK_SET);
        dirp->dd_loc = loc & (DIRBLKSIZ - 1);
        if (dirp->dd_loc != 0)
                dirp->dd_size = read(dirp->dd_fd, dirp->dd_buf, DIRBLKSIZ);
@@ -527,7 +527,7 @@ void
 rst_closedir(RST_DIR *dirp)
 {
 
-       (void)close(dirp->dd_fd);
+       close(dirp->dd_fd);
        free(dirp);
        return;
 }
@@ -554,7 +554,7 @@ opendirfile(const char *name)
        if ((fd = open(name, O_RDONLY)) == -1)
                return (NULL);
        if ((dirp = malloc(sizeof(RST_DIR))) == NULL) {
-               (void)close(fd);
+               close(fd);
                return (NULL);
        }
        dirp->dd_fd = fd;
@@ -593,7 +593,7 @@ setdirmodes(int flags)
        }
        clearerr(mf);
        for (;;) {
-               (void) fread((char *)&node, 1, sizeof(struct modeinfo), mf);
+               fread((char *)&node, 1, sizeof(struct modeinfo), mf);
                if (feof(mf))
                        break;
                ep = lookupino(node.ino);
@@ -613,17 +613,17 @@ setdirmodes(int flags)
                } else {
                        cp = myname(ep);
                        if (!Nflag) {
-                               (void) chown(cp, node.uid, node.gid);
-                               (void) chmod(cp, node.mode);
+                               chown(cp, node.uid, node.gid);
+                               chmod(cp, node.mode);
                                utimes(cp, node.timep);
-                               (void) chflags(cp, node.flags);
+                               chflags(cp, node.flags);
                        }
                        ep->e_flags &= ~NEW;
                }
        }
        if (ferror(mf))
                panic("error setting directory modes\n");
-       (void) fclose(mf);
+       fclose(mf);
 }
 
 /*
@@ -641,7 +641,7 @@ genliteraldir(char *name, ino_t ino)
                panic("Cannot find directory inode %d named %s\n", ino, name);
        if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
                fprintf(stderr, "%s: ", name);
-               (void) fflush(stderr);
+               fflush(stderr);
                fprintf(stderr, "cannot create file: %s\n", strerror(errno));
                return (FAIL);
        }
@@ -664,8 +664,8 @@ genliteraldir(char *name, ino_t ino)
                        done(1);
                }
        }
-       (void) close(dp);
-       (void) close(ofile);
+       close(dp);
+       close(ofile);
        return (GOOD);
 }
 
@@ -711,7 +711,7 @@ allocinotab(ino_t ino, struct dinode *dip, long seekpt)
        node.flags = dip->di_flags;
        node.uid = dip->di_uid;
        node.gid = dip->di_gid;
-       (void) fwrite((char *)&node, 1, sizeof(struct modeinfo), mf);
+       fwrite((char *)&node, 1, sizeof(struct modeinfo), mf);
        return (itp);
 }
 
@@ -738,8 +738,8 @@ done(int exitcode)
 
        closemt();
        if (modefile[0] != '#')
-               (void) unlink(modefile);
+               unlink(modefile);
        if (dirfile[0] != '#')
-               (void) unlink(dirfile);
+               unlink(dirfile);
        exit(exitcode);
 }
index 14d3d46..f91be84 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)interactive.c   8.5 (Berkeley) 5/1/95
  * $FreeBSD: src/sbin/restore/interactive.c,v 1.8.2.1 2001/01/03 14:36:08 iedowse Exp $
- * $DragonFly: src/sbin/restore/interactive.c,v 1.6 2004/02/04 17:40:01 joerg Exp $
+ * $DragonFly: src/sbin/restore/interactive.c,v 1.7 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -147,7 +147,7 @@ loop:
                        fprintf(stderr, "%s: not a directory\n", name);
                        break;
                }
-               (void) strcpy(curdir, name);
+               strcpy(curdir, name);
                break;
        /*
         * Delete elements from the extraction list.
@@ -317,7 +317,7 @@ getcmd(char *curdir, char *cmd, char *name, int size, struct arglist *ap)
         */
        do      {
                fprintf(stderr, "restore > ");
-               (void) fflush(stderr);
+               fflush(stderr);
                if (fgets(input, BUFSIZ, terminal) == NULL) {
                        strcpy(cmd, "quit");
                        return;
@@ -335,7 +335,7 @@ getcmd(char *curdir, char *cmd, char *name, int size, struct arglist *ap)
         * If no argument, use curdir as the default.
         */
        if (*cp == '\0') {
-               (void) strncpy(name, curdir, size);
+               strncpy(name, curdir, size);
                name[size - 1] = '\0';
                return;
        }
@@ -437,17 +437,17 @@ canon(char *rawname, char *canonname, int len)
        register char *cp, *np;
 
        if (strcmp(rawname, ".") == 0 || strncmp(rawname, "./", 2) == 0)
-               (void) strcpy(canonname, "");
+               strcpy(canonname, "");
        else if (rawname[0] == '/')
-               (void) strcpy(canonname, ".");
+               strcpy(canonname, ".");
        else
-               (void) strcpy(canonname, "./");
+               strcpy(canonname, "./");
        if (strlen(canonname) + strlen(rawname) >= len) {
                fprintf(stderr, "canonname: not enough buffer space\n");
                done(1);
        }
                
-       (void) strcat(canonname, rawname);
+       strcat(canonname, rawname);
        /*
         * Eliminate multiple and trailing '/'s
         */
@@ -469,14 +469,14 @@ canon(char *rawname, char *canonname, int len)
                        np++;
                if (np - cp == 1 && *cp == '.') {
                        cp--;
-                       (void) strcpy(cp, np);
+                       strcpy(cp, np);
                        np = cp;
                }
                if (np - cp == 2 && strncmp(cp, "..", 2) == 0) {
                        cp--;
                        while (cp > &canonname[1] && *--cp != '/')
                                /* find beginning of name */;
-                       (void) strcpy(cp, np);
+                       strcpy(cp, np);
                        np = cp;
                }
        }
@@ -524,8 +524,8 @@ printlist(char *name, char *basename)
                fprintf(stderr, "%s:\n", name);
                entries = 0;
                listp = list;
-               (void) strncpy(locname, name, MAXPATHLEN);
-               (void) strncat(locname, "/", MAXPATHLEN);
+               strncpy(locname, name, MAXPATHLEN);
+               strncat(locname, "/", MAXPATHLEN);
                namelen = strlen(locname);
                while ((dp = rst_readdir(dirp))) {
                        if (dp == NULL)
@@ -541,8 +541,7 @@ printlist(char *name, char *basename)
                                fprintf(stderr, "%s%s: name exceeds %d char\n",
                                        locname, dp->d_name, MAXPATHLEN);
                        } else {
-                               (void) strncat(locname, dp->d_name,
-                                   (int)dp->d_namlen);
+                               strncat(locname, dp->d_name, (int)dp->d_namlen);
                                mkentry(locname, dp, listp++);
                                entries++;
                        }
index 9e9e9ad..75cdfb8 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1983, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)main.c  8.6 (Berkeley) 5/4/95
  * $FreeBSD: src/sbin/restore/main.c,v 1.10.2.3 2001/10/02 08:30:17 cjc Exp $
- * $DragonFly: src/sbin/restore/main.c,v 1.5 2003/11/01 17:16:01 drhodus Exp $
+ * $DragonFly: src/sbin/restore/main.c,v 1.6 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -80,7 +80,7 @@ main(int argc, char **argv)
        char *p, name[MAXPATHLEN];
 
        /* Temp files should *not* be readable.  We set permissions later. */
-       (void) umask(077);
+       umask(077);
 
        if (argc < 2)
                usage();
@@ -165,9 +165,9 @@ main(int argc, char **argv)
                errx(1, "none of i, R, r, t or x options specified");
 
        if (signal(SIGINT, onintr) == SIG_IGN)
-               (void) signal(SIGINT, SIG_IGN);
+               signal(SIGINT, SIG_IGN);
        if (signal(SIGTERM, onintr) == SIG_IGN)
-               (void) signal(SIGTERM, SIG_IGN);
+               signal(SIGTERM, SIG_IGN);
        setlinebuf(stderr);
 
        setinput(inputdev);
@@ -282,7 +282,7 @@ main(int argc, char **argv)
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
+       fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
          "restore -i [-cdhkmNuvy] [-b blocksize] [-f file] [-s fileno]",
          "restore -r [-cdkNuvy] [-b blocksize] [-f file] [-s fileno]",
          "restore -R [-cdkNuvy] [-b blocksize] [-f file] [-s fileno]",
@@ -334,7 +334,7 @@ obsolete(argcp, argvp)
                                err(1, NULL);
                        nargv[0][0] = '-';
                        nargv[0][1] = *ap;
-                       (void)strcpy(&nargv[0][2], *argv);
+                       strcpy(&nargv[0][2], *argv);
                        ++argv;
                        ++nargv;
                        break;
index bdcd971..d1a566b 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)restore.c       8.3 (Berkeley) 9/13/94
  * $FreeBSD: src/sbin/restore/restore.c,v 1.7.2.1 2002/03/01 21:32:28 iedowse Exp $
- * $DragonFly: src/sbin/restore/restore.c,v 1.5 2003/11/01 17:16:01 drhodus Exp $
+ * $DragonFly: src/sbin/restore/restore.c,v 1.6 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -81,10 +81,10 @@ addfile(char *name, ino_t ino, int type)
        if (ino == WINO && command == 'i' && !vflag)
                return (descend);
        if (!mflag) {
-               (void) sprintf(buf, "./%u", ino);
+               sprintf(buf, "./%u", ino);
                name = buf;
                if (type == NODE) {
-                       (void) genliteraldir(name, ino);
+                       genliteraldir(name, ino);
                        return (descend);
                }
        }
@@ -490,16 +490,16 @@ keyval(int key)
 {
        static char keybuf[32];
 
-       (void) strcpy(keybuf, "|NIL");
+       strcpy(keybuf, "|NIL");
        keybuf[0] = '\0';
        if (key & ONTAPE)
-               (void) strcat(keybuf, "|ONTAPE");
+               strcat(keybuf, "|ONTAPE");
        if (key & INOFND)
-               (void) strcat(keybuf, "|INOFND");
+               strcat(keybuf, "|INOFND");
        if (key & NAMEFND)
-               (void) strcat(keybuf, "|NAMEFND");
+               strcat(keybuf, "|NAMEFND");
        if (key & MODECHG)
-               (void) strcat(keybuf, "|MODECHG");
+               strcat(keybuf, "|MODECHG");
        return (&keybuf[1]);
 }
 
@@ -642,7 +642,7 @@ createleaves(char *symtabfile)
                        removeleaf(ep);
                        ep->e_flags &= ~REMOVED;
                }
-               (void) extractfile(myname(ep));
+               extractfile(myname(ep));
                ep->e_flags &= ~(NEW|EXTRACT);
                /*
                 * We checkpoint the restore after every tape reel, so
@@ -747,7 +747,7 @@ createfiles(void)
                        ep = lookupino(next);
                        if (ep == NULL)
                                panic("corrupted symbol table\n");
-                       (void) extractfile(myname(ep));
+                       extractfile(myname(ep));
                        ep->e_flags &= ~NEW;
                        if (volno != curvol)
                                skipmaps();
@@ -770,7 +770,7 @@ createlinks(void)
                for ( ; ep != NULL; ep = ep->e_links) {
                        if ((ep->e_flags & NEW) == 0)
                                continue;
-                       (void) addwhiteout(myname(ep));
+                       addwhiteout(myname(ep));
                        ep->e_flags &= ~NEW;
                }
        }
@@ -782,11 +782,11 @@ createlinks(void)
                for (np = ep->e_links; np != NULL; np = np->e_links) {
                        if ((np->e_flags & NEW) == 0)
                                continue;
-                       (void) strcpy(name, myname(ep));
+                       strcpy(name, myname(ep));
                        if (ep->e_type == NODE) {
-                               (void) linkit(name, myname(np), SYMLINK);
+                               linkit(name, myname(np), SYMLINK);
                        } else {
-                               (void) linkit(name, myname(np), HARDLINK);
+                               linkit(name, myname(np), HARDLINK);
                        }
                        np->e_flags &= ~NEW;
                }
index b5696f0..c7cce1b 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)symtab.c        8.3 (Berkeley) 4/28/95
  * $FreeBSD: src/sbin/restore/symtab.c,v 1.7.2.1 2001/12/19 14:54:14 tobez Exp $
- * $DragonFly: src/sbin/restore/symtab.c,v 1.5 2003/11/01 17:16:01 drhodus Exp $
+ * $DragonFly: src/sbin/restore/symtab.c,v 1.6 2004/12/18 21:43:40 swildner Exp $
  */
 
 /*
@@ -397,7 +397,7 @@ savename(char *name)
                if (cp == NULL)
                        panic("no space for string table\n");
        }
-       (void) strcpy(cp, name);
+       strcpy(cp, name);
        return (cp);
 }
 
@@ -459,7 +459,7 @@ dumpsymtable(char *filename, long checkpt)
        for (i = WINO; i <= maxino; i++) {
                for (ep = lookupino(i); ep != NULL; ep = ep->e_links) {
                        ep->e_index = mynum++;
-                       (void) fwrite(ep->e_name, sizeof(char),
+                       fwrite(ep->e_name, sizeof(char),
                               (int)allocsize(ep->e_namlen), fd);
                }
        }
@@ -486,7 +486,7 @@ dumpsymtable(char *filename, long checkpt)
                        if (ep->e_next != NULL)
                                tep->e_next =
                                        (struct entry *)ep->e_next->e_index;
-                       (void) fwrite((char *)tep, sizeof(struct entry), 1, fd);
+                       fwrite((char *)tep, sizeof(struct entry), 1, fd);
                }
        }
        /*
@@ -497,7 +497,7 @@ dumpsymtable(char *filename, long checkpt)
                        tentry = NULL;
                else
                        tentry = (struct entry *)entry[i]->e_index;
-               (void) fwrite((char *)&tentry, sizeof(struct entry *), 1, fd);
+               fwrite((char *)&tentry, sizeof(struct entry *), 1, fd);
        }
        hdr.volno = checkpt;
        hdr.maxino = maxino;
@@ -506,13 +506,13 @@ dumpsymtable(char *filename, long checkpt)
        hdr.dumptime = dumptime;
        hdr.dumpdate = dumpdate;
        hdr.ntrec = ntrec;
-       (void) fwrite((char *)&hdr, sizeof(struct symtableheader), 1, fd);
+       fwrite((char *)&hdr, sizeof(struct symtableheader), 1, fd);
        if (ferror(fd)) {
                fprintf(stderr, "fwrite: %s\n", strerror(errno));
                panic("output error to file %s writing symbol table\n",
                        filename);
        }
-       (void) fclose(fd);
+       fclose(fd);
 }
 
 /*
index 78137f7..bdbc3e5 100644 (file)
@@ -37,7 +37,7 @@
  *
  * @(#)tape.c  8.9 (Berkeley) 5/1/95
  * $FreeBSD: src/sbin/restore/tape.c,v 1.16.2.8 2002/06/30 22:57:52 iedowse Exp $
- * $DragonFly: src/sbin/restore/tape.c,v 1.6 2004/02/04 17:40:01 joerg Exp $
+ * $DragonFly: src/sbin/restore/tape.c,v 1.7 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -136,11 +136,11 @@ setinput(char *source)
                 */
                terminal = fopen(_PATH_TTY, "r");
                if (terminal == NULL) {
-                       (void)fprintf(stderr, "cannot open %s: %s\n",
+                       fprintf(stderr, "cannot open %s: %s\n",
                            _PATH_TTY, strerror(errno));
                        terminal = fopen(_PATH_DEVNULL, "r");
                        if (terminal == NULL) {
-                               (void)fprintf(stderr, "cannot open %s: %s\n",
+                               fprintf(stderr, "cannot open %s: %s\n",
                                    _PATH_DEVNULL, strerror(errno));
                                done(1);
                        }
@@ -343,7 +343,7 @@ again:
                }
                do      {
                        fprintf(stderr, "Specify next volume #: ");
-                       (void) fflush(stderr);
+                       fflush(stderr);
                        if (fgets(buf, BUFSIZ, terminal) == NULL)
                                done(1);
                } while (buf[0] == '\n');
@@ -361,7 +361,7 @@ again:
        fprintf(stderr, "Mount tape volume %ld\n", newvol);
        fprintf(stderr, "Enter ``none'' if there are no more tapes\n");
        fprintf(stderr, "otherwise enter tape name (default: %s) ", magtape);
-       (void) fflush(stderr);
+       fflush(stderr);
        if (fgets(buf, BUFSIZ, terminal) == NULL)
                done(1);
        if (!strcmp(buf, "none\n")) {
@@ -369,7 +369,7 @@ again:
                return;
        }
        if (buf[0] != '\n') {
-               (void) strcpy(magtape, buf);
+               strcpy(magtape, buf);
                magtape[strlen(magtape) - 1] = '\0';
        }
 #ifdef RRESTORE
@@ -449,7 +449,7 @@ gethdr:
                        panic("active file into volume 1\n");
                return;
        }
-       (void) gethead(&spcl);
+       gethead(&spcl);
        findinode(&spcl);
        if (gettingfile) {
                gettingfile = 0;
@@ -570,9 +570,9 @@ extractfile(char *name)
                        return (GOOD);
                }
                if (linkit(lnkbuf, name, SYMLINK) == GOOD) {
-                       (void) lchown(name, uid, gid);
-                       (void) lchmod(name, mode);
-                       (void) lutimes(name, timep);
+                       lchown(name, uid, gid);
+                       lchmod(name, mode);
+                       lutimes(name, timep);
                        return (GOOD);
                }
                return (FAIL);
@@ -584,17 +584,17 @@ extractfile(char *name)
                        return (GOOD);
                }
                if (uflag && !Nflag)
-                       (void)unlink(name);
+                       unlink(name);
                if (mkfifo(name, mode) < 0) {
                        fprintf(stderr, "%s: cannot create fifo: %s\n",
                            name, strerror(errno));
                        skipfile();
                        return (FAIL);
                }
-               (void) chown(name, uid, gid);
-               (void) chmod(name, mode);
-               (void) utimes(name, timep);
-               (void) chflags(name, flags);
+               chown(name, uid, gid);
+               chmod(name, mode);
+               utimes(name, timep);
+               chflags(name, flags);
                skipfile();
                return (GOOD);
 
@@ -606,17 +606,17 @@ extractfile(char *name)
                        return (GOOD);
                }
                if (uflag)
-                       (void)unlink(name);
+                       unlink(name);
                if (mknod(name, mode, (int)curfile.dip->di_rdev) < 0) {
                        fprintf(stderr, "%s: cannot create special file: %s\n",
                            name, strerror(errno));
                        skipfile();
                        return (FAIL);
                }
-               (void) chown(name, uid, gid);
-               (void) chmod(name, mode);
-               (void) utimes(name, timep);
-               (void) chflags(name, flags);
+               chown(name, uid, gid);
+               chmod(name, mode);
+               utimes(name, timep);
+               chflags(name, flags);
                skipfile();
                return (GOOD);
 
@@ -627,7 +627,7 @@ extractfile(char *name)
                        return (GOOD);
                }
                if (uflag)
-                       (void)unlink(name);
+                       unlink(name);
                if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC,
                    0666)) < 0) {
                        fprintf(stderr, "%s: cannot create file: %s\n",
@@ -635,12 +635,12 @@ extractfile(char *name)
                        skipfile();
                        return (FAIL);
                }
-               (void) fchown(ofile, uid, gid);
-               (void) fchmod(ofile, mode);
+               fchown(ofile, uid, gid);
+               fchmod(ofile, mode);
                getfile(xtrfile, xtrskip);
-               (void) close(ofile);
+               close(ofile);
                utimes(name, timep);
-               (void) chflags(name, flags);
+               chflags(name, flags);
                return (GOOD);
        }
        /* NOTREACHED */
@@ -775,7 +775,7 @@ xtrlnkfile(char *buf, long size)
                    curfile.name, lnkbuf, buf, pathlen);
                done(1);
        }
-       (void) strcat(lnkbuf, buf);
+       strcat(lnkbuf, buf);
 }
 
 /*
@@ -987,7 +987,7 @@ closemt(void)
                rmtclose();
        else
 #endif
-               (void) close(mt);
+               close(mt);
 }
 
 /*
@@ -1308,7 +1308,7 @@ msg(const char *fmt, ...)
 {
        va_list ap;
        va_start(ap, fmt);
-       (void)vfprintf(stderr, fmt, ap);
+       vfprintf(stderr, fmt, ap);
        va_end(ap);
 }
 #endif /* RRESTORE */
index caf98c7..9ad90e8 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)utilities.c     8.5 (Berkeley) 4/28/95
  * $FreeBSD: src/sbin/restore/utilities.c,v 1.8.2.2 2001/07/30 10:30:08 dd Exp $
- * $DragonFly: src/sbin/restore/utilities.c,v 1.4 2003/09/28 14:39:22 hmp Exp $
+ * $DragonFly: src/sbin/restore/utilities.c,v 1.5 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -89,7 +89,7 @@ mktempname(register struct entry *ep)
        if (ep->e_flags & TMPNAME)
                badentry(ep, "mktempname: called with TMPNAME");
        ep->e_flags |= TMPNAME;
-       (void) strcpy(oldname, myname(ep));
+       strcpy(oldname, myname(ep));
        freename(ep->e_name);
        ep->e_name = savename(gentempname(ep));
        ep->e_namlen = strlen(ep->e_name);
@@ -111,7 +111,7 @@ gentempname(struct entry *ep)
                i++;
        if (np == NULL)
                badentry(ep, "not on ino list");
-       (void) sprintf(name, "%s%ld%lu", TMPHDR, i, (u_long)ep->e_ino);
+       sprintf(name, "%s%ld%lu", TMPHDR, i, (u_long)ep->e_ino);
        return (name);
 }
 
@@ -199,7 +199,7 @@ linkit(char *existing, char *new, int type)
 
        /* if we want to unlink first, do it now so *link() won't fail */
        if (uflag && !Nflag)
-               (void)unlink(new);
+               unlink(new);
 
        if (type == SYMLINK) {
                if (!Nflag && symlink(existing, new) < 0) {
@@ -345,20 +345,20 @@ flagvalues(register struct entry *ep)
 {
        static char flagbuf[BUFSIZ];
 
-       (void) strcpy(flagbuf, "|NIL");
+       strcpy(flagbuf, "|NIL");
        flagbuf[0] = '\0';
        if (ep->e_flags & REMOVED)
-               (void) strcat(flagbuf, "|REMOVED");
+               strcat(flagbuf, "|REMOVED");
        if (ep->e_flags & TMPNAME)
-               (void) strcat(flagbuf, "|TMPNAME");
+               strcat(flagbuf, "|TMPNAME");
        if (ep->e_flags & EXTRACT)
-               (void) strcat(flagbuf, "|EXTRACT");
+               strcat(flagbuf, "|EXTRACT");
        if (ep->e_flags & NEW)
-               (void) strcat(flagbuf, "|NEW");
+               strcat(flagbuf, "|NEW");
        if (ep->e_flags & KEEP)
-               (void) strcat(flagbuf, "|KEEP");
+               strcat(flagbuf, "|KEEP");
        if (ep->e_flags & EXISTED)
-               (void) strcat(flagbuf, "|EXISTED");
+               strcat(flagbuf, "|EXISTED");
        return (&flagbuf[1]);
 }
 
@@ -388,7 +388,7 @@ reply(char *question)
 
        do      {
                fprintf(stderr, "%s? [yn] ", question);
-               (void) fflush(stderr);
+               fflush(stderr);
                c = getc(terminal);
                while (c != '\n' && getc(terminal) != '\n')
                        if (c == EOF)
index 1758a85..c14a463 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/routed/if.c,v 1.6.2.1 2000/08/14 17:00:03 sheldonh Exp $
- * $DragonFly: src/sbin/routed/if.c,v 1.3 2004/07/28 12:27:40 joerg Exp $
+ * $DragonFly: src/sbin/routed/if.c,v 1.4 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include "defs.h"
@@ -512,7 +512,7 @@ ifdel(struct interface *ifp)
                                rip_sock_mcast = 0;
                }
                if (ifp->int_rip_sock >= 0) {
-                       (void)close(ifp->int_rip_sock);
+                       close(ifp->int_rip_sock);
                        ifp->int_rip_sock = -1;
                        fix_select();
                }
@@ -525,7 +525,7 @@ ifdel(struct interface *ifp)
                 * Assume routes just using gateways beyond this interface
                 * will timeout naturally, and have probably already died.
                 */
-               (void)rn_walktree(rhead, walk_bad, 0);
+               rn_walktree(rhead, walk_bad, 0);
 
                set_rdisc_mg(ifp, 0);
                if_bad_rdisc(ifp);
@@ -576,7 +576,7 @@ if_bad(struct interface *ifp)
                            && !strcmp(ifp->int_name, ifp1->int_name))
                                if_bad(ifp1);
                }
-               (void)rn_walktree(rhead, walk_bad, 0);
+               rn_walktree(rhead, walk_bad, 0);
                if_bad_rdisc(ifp);
        }
 }
@@ -981,7 +981,7 @@ ifinit(void)
                        /* or that were off and are now ok */
                        if (!iff_up(ifp->int_if_flags)) {
                                ifp->int_if_flags |= IFF_UP;
-                               (void)if_ok(ifp, "");
+                               if_ok(ifp, "");
                        }
 
                        /* If it has been long enough,
@@ -1055,7 +1055,7 @@ ifinit(void)
                        /* otherwise, it is active and healthy
                         */
                        ifp->int_act_time = now.tv_sec;
-                       (void)if_ok(ifp, "");
+                       if_ok(ifp, "");
                        continue;
                }
 
index f590f88..ebbf97e 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/routed/input.c,v 1.7.2.1 2001/08/01 09:01:45 obrien Exp $
- * $DragonFly: src/sbin/routed/input.c,v 1.3 2004/07/28 12:27:40 joerg Exp $
+ * $DragonFly: src/sbin/routed/input.c,v 1.4 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include "defs.h"
@@ -215,7 +215,7 @@ input(struct sockaddr_in *from,             /* received from this IP address */
                                aifp = ifp1;
                                if (check_remote(aifp)) {
                                        aifp->int_act_time = now.tv_sec;
-                                       (void)if_ok(aifp, "remote ");
+                                       if_ok(aifp, "remote ");
                                }
                        } else if (from->sin_port == htons(RIP_PORT)) {
                                trace_pkt("    discard our own RIP request");
@@ -429,13 +429,13 @@ input(struct sockaddr_in *from,           /* received from this IP address */
 
                if (from->sin_port != htons(RIP_PORT)) {
                        /* query */
-                       (void)output(OUT_QUERY, from, aifp,
-                                    v12buf.buf,
-                                    ((char *)v12buf.n - (char*)v12buf.buf));
+                       output(OUT_QUERY, from, aifp,
+                              v12buf.buf,
+                              ((char *)v12buf.n - (char*)v12buf.buf));
                } else if (supplier) {
-                       (void)output(OUT_UNICAST, from, aifp,
-                                    v12buf.buf,
-                                    ((char *)v12buf.n - (char*)v12buf.buf));
+                       output(OUT_UNICAST, from, aifp,
+                              v12buf.buf,
+                              ((char *)v12buf.n - (char*)v12buf.buf));
                } else {
                        /* Only answer a router if we are a supplier
                         * to keep an unwary host that is just starting
@@ -504,7 +504,7 @@ input(struct sockaddr_in *from,             /* received from this IP address */
                                aifp = ifp1;
                                if (check_remote(aifp)) {
                                        aifp->int_act_time = now.tv_sec;
-                                       (void)if_ok(aifp, "remote ");
+                                       if_ok(aifp, "remote ");
                                }
                        } else {
                                trace_pkt("    discard our own RIP response");
index 2d784b5..ac7d7ba 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/routed/main.c,v 1.11.2.1 2000/08/14 17:00:03 sheldonh Exp $
- * $DragonFly: src/sbin/routed/main.c,v 1.2 2003/06/17 04:27:34 dillon Exp $
+ * $DragonFly: src/sbin/routed/main.c,v 1.3 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include "defs.h"
@@ -135,8 +135,8 @@ main(int argc,
        now_garbage = EPOCH - GARBAGE_TIME;
        wtime.tv_sec = 0;
 
-       (void)gethostname(myname, sizeof(myname)-1);
-       (void)gethost(myname, &myaddr);
+       gethostname(myname, sizeof(myname)-1);
+       gethost(myname, &myaddr);
 
        while ((n = getopt(argc, argv, "sqdghmpAtvT:F:P:")) != -1) {
                switch (n) {
@@ -555,7 +555,7 @@ void
 sigterm(int sig)
 {
        stopint = sig;
-       (void)signal(sig, SIG_DFL);     /* catch it only once */
+       signal(sig, SIG_DFL);   /* catch it only once */
 }
 
 
@@ -683,7 +683,7 @@ rip_off(void)
        if (rip_sock >= 0 && !mhome) {
                trace_act("turn off RIP");
 
-               (void)close(rip_sock);
+               close(rip_sock);
                rip_sock = -1;
 
                /* get non-broadcast sockets to listen to queries.
@@ -759,7 +759,7 @@ rip_on(struct interface *ifp)
                 */
                for (ifp = ifnet; ifp != 0; ifp = ifp->int_next) {
                        if (ifp->int_rip_sock >= 0) {
-                               (void)close(ifp->int_rip_sock);
+                               close(ifp->int_rip_sock);
                                ifp->int_rip_sock = -1;
                        }
                }
@@ -860,9 +860,9 @@ msglog(const char *p, ...)
 
        if (ftrace != 0) {
                if (ftrace == stdout)
-                       (void)fputs("routed: ", ftrace);
-               (void)vfprintf(ftrace, p, args);
-               (void)fputc('\n', ftrace);
+                       fputs("routed: ", ftrace);
+               vfprintf(ftrace, p, args);
+               fputc('\n', ftrace);
        }
 }
 
@@ -923,8 +923,8 @@ msglim(struct msg_limit *lim, naddr addr, const char *p, ...)
 
        /* always display the message if tracing */
        if (ftrace != 0) {
-               (void)vfprintf(ftrace, p, args);
-               (void)fputc('\n', ftrace);
+               vfprintf(ftrace, p, args);
+               fputc('\n', ftrace);
        }
 }
 
@@ -939,10 +939,10 @@ logbad(int dump, const char *p, ...)
        va_start(args, p);
        vsyslog(LOG_ERR, p, args);
 
-       (void)fputs("routed: ", stderr);
-       (void)vfprintf(stderr, p, args);
-       (void)fputs("; giving up\n",stderr);
-       (void)fflush(stderr);
+       fputs("routed: ", stderr);
+       vfprintf(stderr, p, args);
+       fputs("; giving up\n",stderr);
+       fflush(stderr);
 
        if (dump)
                abort();
index b0fc207..646ad74 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/routed/output.c,v 1.5.2.1 2000/08/14 17:00:03 sheldonh Exp $
- * $DragonFly: src/sbin/routed/output.c,v 1.3 2004/07/28 12:27:40 joerg Exp $
+ * $DragonFly: src/sbin/routed/output.c,v 1.4 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include "defs.h"
@@ -789,7 +789,7 @@ supply(struct sockaddr_in *dst,
                }
        }
 
-       (void)rn_walktree(rhead, walk_supply, 0);
+       rn_walktree(rhead, walk_supply, 0);
        ag_flush(0,0,supply_out);
 
        /* Flush the packet buffers, provided they are not empty and
index 0905cc2..6b05a95 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/routed/parms.c,v 1.7.2.1 2000/08/14 17:00:03 sheldonh Exp $
- * $DragonFly: src/sbin/routed/parms.c,v 1.3 2004/07/28 12:27:40 joerg Exp $
+ * $DragonFly: src/sbin/routed/parms.c,v 1.4 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include "defs.h"
@@ -184,7 +184,7 @@ gwkludge(void)
 
        if (0 > fstat(fileno(fp), &sb)) {
                msglog("could not stat() "_PATH_GATEWAYS);
-               (void)fclose(fp);
+               fclose(fp);
                return;
        }
 
@@ -341,7 +341,7 @@ gwkludge(void)
                if (!(state & IS_EXTERNAL)
                    && ifp->int_mask != ifp->int_std_mask)
                        ifp->int_state |= IS_SUBNET;
-               (void)sprintf(ifp->int_name, "%s(%s)", type, gname);
+               sprintf(ifp->int_name, "%s(%s)", type, gname);
                ifp->int_index = -1;
 
                if_link(ifp);
@@ -360,7 +360,7 @@ gwkludge(void)
                trace_if("Add", ifp);
        }
 
-       (void)fclose(fp);
+       fclose(fp);
 }
 
 
index f6f9bf6..72ec398 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/routed/rdisc.c,v 1.5.2.1 2000/08/14 17:00:04 sheldonh Exp $
- * $DragonFly: src/sbin/routed/rdisc.c,v 1.2 2003/06/17 04:27:34 dillon Exp $
+ * $DragonFly: src/sbin/routed/rdisc.c,v 1.3 2004/12/18 21:43:40 swildner Exp $
  */
 
 #include "defs.h"
@@ -124,22 +124,22 @@ trace_rdisc(const char    *act,
        lastlog();
 
        if (p->icmp.icmp_type == ICMP_ROUTERADVERT) {
-               (void)fprintf(ftrace, "%s Router Ad"
-                             " from %s to %s via %s life=%d\n",
-                             act, naddr_ntoa(from), naddr_ntoa(to),
-                             ifp ? ifp->int_name : "?",
-                             ntohs(p->ad.icmp_ad_life));
+               fprintf(ftrace, "%s Router Ad"
+                       " from %s to %s via %s life=%d\n",
+                       act, naddr_ntoa(from), naddr_ntoa(to),
+                       ifp ? ifp->int_name : "?",
+                       ntohs(p->ad.icmp_ad_life));
                if (!TRACECONTENTS)
                        return;
 
                wp = &p->ad.icmp_ad_info[0].icmp_ad_addr;
                lim = &wp[(len - sizeof(p->ad)) / sizeof(*wp)];
                for (i = 0; i < p->ad.icmp_ad_num && wp <= lim; i++) {
-                       (void)fprintf(ftrace, "\t%s preference=%d",
-                                     naddr_ntoa(wp[0]), (int)ntohl(wp[1]));
+                       fprintf(ftrace, "\t%s preference=%d",
+                               naddr_ntoa(wp[0]), (int)ntohl(wp[1]));
                        wp += p->ad.icmp_ad_asize;
                }
-               (void)fputc('\n',ftrace);
+               fputc('\n',ftrace);
 
        } else {
                trace_act("%s Router Solic. from %s to %s via %s value=%#x",
index 8e21973..1225752 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/routed/rtquery/rtquery.c,v 1.13 1999/08/28 00:14:21 peter Exp $
- * $DragonFly: src/sbin/routed/rtquery/rtquery.c,v 1.3 2004/07/28 12:27:40 joerg Exp $
+ * $DragonFly: src/sbin/routed/rtquery/rtquery.c,v 1.4 2004/12/18 21:43:46 swildner Exp $
  */
 
 char copyright[] =
@@ -320,7 +320,7 @@ trace_loop(char *argv[])
        int res;
 
        if (geteuid() != 0) {
-               (void)fprintf(stderr, "-t requires UID 0\n");
+               fprintf(stderr, "-t requires UID 0\n");
                exit(1);
        }
 
@@ -646,14 +646,14 @@ rip_input(struct sockaddr_in *from,
                name = "";
                if (n->n_family == RIP_AF_INET) {