Clean (void) casts from usr.sbin
authorSascha Wildner <swildner@dragonflybsd.org>
Sat, 18 Dec 2004 22:48:15 +0000 (22:48 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Sat, 18 Dec 2004 22:48:15 +0000 (22:48 +0000)
133 files changed:
usr.sbin/IPXrouted/af.c
usr.sbin/IPXrouted/startup.c
usr.sbin/IPXrouted/trace.c
usr.sbin/accton/accton.c
usr.sbin/apmd/apmd.c
usr.sbin/arp/arp.c
usr.sbin/atm/atmarpd/atmarp_scsp.c
usr.sbin/atm/atmarpd/atmarp_subr.c
usr.sbin/atm/atmarpd/atmarp_timer.c
usr.sbin/atm/atmarpd/atmarpd.c
usr.sbin/atm/scspd/scsp_cafsm.c
usr.sbin/atm/scspd/scsp_msg.c
usr.sbin/atm/scspd/scsp_output.c
usr.sbin/atm/scspd/scsp_print.c
usr.sbin/atm/scspd/scsp_socket.c
usr.sbin/atm/scspd/scsp_subr.c
usr.sbin/atm/scspd/scsp_timer.c
usr.sbin/authpf/authpf.c
usr.sbin/bootparamd/bootparamd/main.c
usr.sbin/cdcontrol/cdcontrol.c
usr.sbin/chown/chown.c
usr.sbin/chroot/chroot.c
usr.sbin/ckdist/ckdist.c
usr.sbin/clog/clog.c
usr.sbin/cron/cron/cron.c
usr.sbin/cron/cron/database.c
usr.sbin/cron/cron/do_command.c
usr.sbin/cron/cron/popen.c
usr.sbin/cron/crontab/crontab.c
usr.sbin/cron/lib/compat.c
usr.sbin/cron/lib/env.c
usr.sbin/cron/lib/misc.c
usr.sbin/daemon/daemon.c
usr.sbin/dpt/dpt_ctlinfo/dpt_ctlinfo.c
usr.sbin/dpt/dpt_ctls/dpt_ctls.c
usr.sbin/dpt/dpt_dm/dpt_dm.c
usr.sbin/dpt/dpt_led/dpt_led.c
usr.sbin/dpt/dpt_sig/dpt_sig.c
usr.sbin/dpt/dpt_softc/dpt_softc.c
usr.sbin/dpt/dpt_sysinfo/dpt_sysinfo.c
usr.sbin/i4b/isdnd/log.c
usr.sbin/ifmcstat/ifmcstat.c
usr.sbin/inetd/builtins.c
usr.sbin/jail/jail.c
usr.sbin/keyserv/keyserv.c
usr.sbin/keyserv/setkey.c
usr.sbin/lpr/common_source/common.c
usr.sbin/lpr/common_source/displayq.c
usr.sbin/lpr/common_source/net.c
usr.sbin/lpr/common_source/rmjob.c
usr.sbin/lpr/common_source/startdaemon.c
usr.sbin/lpr/lpc/cmds.c
usr.sbin/lpr/lpd/lpd.c
usr.sbin/lpr/lpd/printjob.c
usr.sbin/lpr/lpd/recvjob.c
usr.sbin/lpr/lpr/lpr.c
usr.sbin/lpr/pac/pac.c
usr.sbin/mailwrapper/mailwrapper.c
usr.sbin/mld6query/mld6.c
usr.sbin/mrouted/main.c
usr.sbin/mrouted/mtrace.c
usr.sbin/ndp/ndp.c
usr.sbin/newsyslog/newsyslog.c
usr.sbin/nghook/main.c
usr.sbin/pccard/pccardd/pccardd.c
usr.sbin/pcvt/kbdio/kbdio.y
usr.sbin/pcvt/set2061/ICD2061Aalt.c
usr.sbin/pcvt/set2061/compiler.h
usr.sbin/pcvt/set2061/main.c
usr.sbin/pcvt/vgaio/vgaio.y
usr.sbin/pflogd/pflogd.c
usr.sbin/pkg_install/add/extract.c
usr.sbin/pkg_install/add/perform.c
usr.sbin/pkg_install/create/perform.c
usr.sbin/pkg_install/delete/main.c
usr.sbin/pkg_install/delete/perform.c
usr.sbin/pkg_install/lib/file.c
usr.sbin/pkg_install/sign/pgp_check.c
usr.sbin/pkg_install/sign/pgp_sign.c
usr.sbin/pkg_install/sign/sha1.c
usr.sbin/pkg_install/sign/stand.c
usr.sbin/pppd/auth.c
usr.sbin/pppd/main.c
usr.sbin/pppd/options.c
usr.sbin/pppstats/pppstats.c
usr.sbin/pstat/pstat.c
usr.sbin/pw/pw.c
usr.sbin/pwd_mkdb/pwd_mkdb.c
usr.sbin/quotaon/quotaon.c
usr.sbin/rarpd/rarpd.c
usr.sbin/resident/resident.c
usr.sbin/rmt/rmt.c
usr.sbin/route6d/route6d.c
usr.sbin/rpc.lockd/lockd.c
usr.sbin/rpc.statd/statd.c
usr.sbin/rpc.umntall/rpc.umntall.c
usr.sbin/rpc.yppasswdd/pw_copy.c
usr.sbin/rpc.yppasswdd/pw_util.c
usr.sbin/rpc.yppasswdd/yppasswdd_main.c
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
usr.sbin/rpc.ypupdated/update.c
usr.sbin/rpc.ypupdated/yp_dbdelete.c
usr.sbin/rpc.ypupdated/yp_dbupdate.c
usr.sbin/rpc.ypupdated/ypupdated_main.c
usr.sbin/rpc.ypxfrd/ypxfrd_main.c
usr.sbin/rrenumd/rrenumd.c
usr.sbin/rtadvd/rtadvd.c
usr.sbin/rtprio/rtprio.c
usr.sbin/rtsold/rtsold.c
usr.sbin/rwhod/rwhod.c
usr.sbin/sa/main.c
usr.sbin/setkey/setkey.c
usr.sbin/setkey/test-pfkey.c
usr.sbin/sliplogin/sliplogin.c
usr.sbin/syslogd/syslogd.c
usr.sbin/tcpdump/tcpslice/util.c
usr.sbin/timed/timedc/cmds.c
usr.sbin/traceroute/traceroute.c
usr.sbin/traceroute6/traceroute6.c
usr.sbin/tzsetup/tzsetup.c
usr.sbin/usbd/usbd.c
usr.sbin/vipw/pw_util.c
usr.sbin/vipw/vipw.c
usr.sbin/vnconfig/vnconfig.c
usr.sbin/watch/watch.c
usr.sbin/yp_mkdb/yp_mkdb.c
usr.sbin/ypbind/yp_ping.c
usr.sbin/ypbind/ypbind.c
usr.sbin/ypserv/yp_dblookup.c
usr.sbin/ypserv/yp_main.c
usr.sbin/zic/ialloc.c
usr.sbin/zic/zdump.c
usr.sbin/zic/zic.c

index 8cd785e..e02d066 100644 (file)
@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/IPXrouted/af.c,v 1.6 1999/08/28 01:15:01 peter Exp $
- * $DragonFly: src/usr.sbin/IPXrouted/af.c,v 1.3 2004/03/11 09:38:59 hmp Exp $
+ * $DragonFly: src/usr.sbin/IPXrouted/af.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  *
  * @(#)af.c    8.1 (Berkeley) 6/5/93
  */
@@ -165,13 +165,13 @@ ipxnet_output(int s, int flags, struct sockaddr_ipx *sipx, int size)
                for (ifp = ifnet; ifp; ifp = ifp->int_next) {
                        sipx->sipx_addr.x_net = 
                                satoipx_addr(ifp->int_addr).x_net;
-                       (void) sendto(s, msg, size, flags,
+                       sendto(s, msg, size, flags,
                            (struct sockaddr *)sipx, sizeof (*sipx));
                }
                return;
        }
        
-       (void) sendto(s, msg, size, flags,
+       sendto(s, msg, size, flags,
            (struct sockaddr *)sipx, sizeof (*sipx));
 }
 
index 4826f21..6447aea 100644 (file)
@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/IPXrouted/startup.c,v 1.8.2.1 2000/07/01 10:46:25 ps Exp $
- * $DragonFly: src/usr.sbin/IPXrouted/startup.c,v 1.3 2004/03/11 09:38:59 hmp Exp $
+ * $DragonFly: src/usr.sbin/IPXrouted/startup.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  *
  * @(#)startup.c       8.1 (Berkeley) 6/5/93
  */
@@ -69,10 +69,10 @@ quit(char *s)
 {
        int sverrno = errno;
 
-       (void) fprintf(stderr, "IPXroute: ");
+       fprintf(stderr, "IPXroute: ");
        if (s)
-               (void) fprintf(stderr, "%s: ", s);
-       (void) fprintf(stderr, "%s\n", strerror(sverrno));
+               fprintf(stderr, "%s: ", s);
+       fprintf(stderr, "%s\n", strerror(sverrno));
        exit(1);
        /* NOTREACHED */
 }
index 699714e..051b248 100644 (file)
@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/IPXrouted/trace.c,v 1.6.2.1 2000/07/20 10:35:22 kris Exp $
- * $DragonFly: src/usr.sbin/IPXrouted/trace.c,v 1.3 2004/03/11 09:38:59 hmp Exp $
+ * $DragonFly: src/usr.sbin/IPXrouted/trace.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  *
  * @(#)trace.c 8.1 (Berkeley) 6/5/93
  */
@@ -465,7 +465,7 @@ ipxdp_nettoa(union ipx_net val)
        static char buf[100];
        
        net.net_e = val;
-       (void)sprintf(buf, "%lx", ntohl(net.long_e));
+       sprintf(buf, "%lx", ntohl(net.long_e));
        return (buf);
 }
 
@@ -475,7 +475,7 @@ ipxdp_ntoa(struct ipx_addr *addr)
 {
     static char buf[100];
 
-    (void)sprintf(buf, "%s#%x:%x:%x:%x:%x:%x",
+    sprintf(buf, "%s#%x:%x:%x:%x:%x:%x",
        ipxdp_nettoa(addr->x_net),
        addr->x_host.c_host[0], addr->x_host.c_host[1], 
        addr->x_host.c_host[2], addr->x_host.c_host[3], 
index 530425d..fd67316 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1988, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)accton.c        8.1 (Berkeley) 6/6/93
  * $FreeBSD: src/usr.sbin/accton/accton.c,v 1.5 1999/08/28 01:15:10 peter Exp $
- * $DragonFly: src/usr.sbin/accton/accton.c,v 1.4 2003/11/15 20:33:42 eirikn Exp $
+ * $DragonFly: src/usr.sbin/accton/accton.c,v 1.5 2004/12/18 22:48:02 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -77,6 +77,6 @@ main(int argc, char **argv)
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: accton [file]\n");
+       fprintf(stderr, "usage: accton [file]\n");
        exit(1);
 }
index c295d55..91b04d2 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/apmd/apmd.c,v 1.3.2.1 2001/08/13 17:30:30 nsayer Exp $
- * $DragonFly: src/usr.sbin/apmd/apmd.c,v 1.3 2003/11/15 20:33:42 eirikn Exp $
+ * $DragonFly: src/usr.sbin/apmd/apmd.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 #include <assert.h>
@@ -113,7 +113,7 @@ event_cmd_exec_act(void *this)
 
        switch ((pid = fork())) {
        case -1:
-               (void) warn("cannot fork");
+               warn("cannot fork");
                goto out;
        case 0:
                /* child process */
@@ -194,7 +194,7 @@ clone_event_cmd_list(struct event_cmd *p)
        for ( ;p; p = p->next) {
                assert(p->op->clone);
                if ((q->next = p->op->clone(p)) == NULL)
-                       (void) err(1, "out of memory");
+                       err(1, "out of memory");
                q = q->next;
        }
        q->next = NULL;
@@ -232,7 +232,7 @@ register_battery_handlers(
                struct battery_watch_event *we;
                
                if ((we = malloc(sizeof(struct battery_watch_event))) == NULL)
-                       (void) err(1, "out of memory");
+                       err(1, "out of memory");
 
                we->next = battery_watch_list; /* starts at NULL */
                battery_watch_list = we;
@@ -263,7 +263,7 @@ register_apm_event_handlers(
                                break;
                        p = events[n].cmdlist;
                        if ((q = clone_event_cmd_list(cmdlist)) == NULL)
-                               (void) err(1, "out of memory");
+                               err(1, "out of memory");
                        if (p) {
                                while (p->next != NULL)
                                        p = p->next;
@@ -309,7 +309,7 @@ exec_event_cmd(struct event_config *ev)
        status = exec_run_cmd(ev->cmdlist);
        if (status && ev->rejectable) {
                syslog(LOG_ERR, "canceled");
-               (void) event_cmd_reject_act(NULL);
+               event_cmd_reject_act(NULL);
        }
        return status;
 }
@@ -326,7 +326,7 @@ read_config(void)
        int i;
 
        if ((yyin = fopen(apmd_configfile, "r")) == NULL) {
-               (void) err(1, "cannot open config file");
+               err(1, "cannot open config file");
        }
 
 #ifdef DEBUG
@@ -334,7 +334,7 @@ read_config(void)
 #endif
 
        if (yyparse() != 0)
-               (void) err(1, "cannot parse config file");
+               err(1, "cannot parse config file");
 
        fclose(yyin);
 
@@ -343,7 +343,7 @@ read_config(void)
                if (events[i].cmdlist) {
                        u_int event_type = i;
                        if (write(apmctl_fd, &event_type, sizeof(u_int)) == -1) {
-                               (void) err(1, "cannot enable event 0x%x", event_type);
+                               err(1, "cannot enable event 0x%x", event_type);
                        }
                }
        }
@@ -396,7 +396,7 @@ destroy_config(void)
                if (events[i].cmdlist) {
                        u_int event_type = i;
                        if (write(apmctl_fd, &event_type, sizeof(u_int)) == -1) {
-                               (void) err(1, "cannot disable event 0x%x", event_type);
+                               err(1, "cannot disable event 0x%x", event_type);
                        }
                }
        }
@@ -448,7 +448,7 @@ void
 enque_signal(int sig)
 {
        if (write(signal_fd[1], &sig, sizeof sig) != sizeof sig)
-               (void) err(1, "cannot process signal.");
+               err(1, "cannot process signal.");
 }
 
 void
@@ -480,7 +480,7 @@ proc_signal(int fd)
                        wait_child();
                        break;
                default:
-                       (void) warn("unexpected signal(%d) received.", sig);
+                       warn("unexpected signal(%d) received.", sig);
                        break;
                }
        }
@@ -523,7 +523,7 @@ check_battery(void)
 
        if (first_time) {
                if ( ioctl(apmnorm_fd, APMIO_GETINFO, &pw_info) < 0)
-                       (void) err(1, "cannot check battery state.");
+                       err(1, "cannot check battery state.");
 /*
  * This next statement isn't entirely true. The spec does not tie AC
  * line state to battery charging or not, but this is a bit lazier to do.
@@ -538,7 +538,7 @@ check_battery(void)
         * of smoothing or correction?
         */
        if ( ioctl(apmnorm_fd, APMIO_GETINFO, &pw_info) < 0)
-               (void) err(1, "cannot check battery state.");
+               err(1, "cannot check battery state.");
 
        /*
         * If we're not in the state now that we were in last time,
@@ -611,7 +611,7 @@ event_loop(void)
                sigprocmask(SIG_SETMASK, &osigmask, NULL);
                if ((res=select(fdmax + 1, &rfds, 0, 0, &to)) < 0) {
                        if (errno != EINTR)
-                               (void) err(1, "select");
+                               err(1, "select");
                }
                sigprocmask(SIG_SETMASK, &sigmask, NULL);
 
@@ -653,7 +653,7 @@ main(int ac, char* av[])
                        verbose = 1;
                        break;
                default:
-                       (void) err(1, "unknown option `%c'", ch);
+                       err(1, "unknown option `%c'", ch);
                }
        }
 
@@ -661,7 +661,7 @@ main(int ac, char* av[])
                daemon(0, 0);
 
 #ifdef NICE_INCR
-       (void) nice(NICE_INCR);
+       nice(NICE_INCR);
 #endif
 
        if (!daemonize)
@@ -673,16 +673,16 @@ main(int ac, char* av[])
        syslog(LOG_NOTICE, "start");
 
        if (pipe(signal_fd) < 0)
-               (void) err(1, "pipe");
+               err(1, "pipe");
        if (fcntl(signal_fd[0], F_SETFL, O_NONBLOCK) < 0)
-               (void) err(1, "fcntl");
+               err(1, "fcntl");
 
        if ((apmnorm_fd = open(APM_NORM_DEVICEFILE, O_RDWR)) == -1) {
-               (void) err(1, "cannot open device file `%s'", APM_NORM_DEVICEFILE);
+               err(1, "cannot open device file `%s'", APM_NORM_DEVICEFILE);
        }
 
        if ((apmctl_fd = open(APM_CTL_DEVICEFILE, O_RDWR)) == -1) {
-               (void) err(1, "cannot open device file `%s'", APM_CTL_DEVICEFILE);
+               err(1, "cannot open device file `%s'", APM_CTL_DEVICEFILE);
        }
 
        restart();
index 6be3e9e..36ee712 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1984, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)from: arp.c     8.2 (Berkeley) 1/2/94
  * $FreeBSD: src/usr.sbin/arp/arp.c,v 1.22.2.12 2003/04/16 10:02:37 ru Exp $
- * $DragonFly: src/usr.sbin/arp/arp.c,v 1.5 2004/11/02 23:49:35 dillon Exp $
+ * $DragonFly: src/usr.sbin/arp/arp.c,v 1.6 2004/12/18 22:48:02 swildner Exp $
  */
 
 /*
@@ -178,7 +178,7 @@ main(int argc, char **argv)
                if (argc < 2 || argc > 6)
                        usage();
                if (func == F_REPLACE)
-                       (void) delete(argv[0], NULL);
+                       delete(argv[0], NULL);
                rtn = set(argc, argv) ? 1 : 0;
                break;
        case F_DELETE:
index d73599e..3330b83 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/atmarpd/atmarp_scsp.c,v 1.3 1999/08/28 01:15:30 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/atmarpd/atmarp_scsp.c,v 1.3 2003/11/15 20:33:42 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/atmarpd/atmarp_scsp.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 /*
@@ -616,8 +616,7 @@ atmarp_scsp_connect(Atmarp_intf *aip)
         */
        strncpy(local_addr.sa_data, ATMARP_SOCK_PREFIX,
                        sizeof(local_addr.sa_data));
-       (void)strncat(local_addr.sa_data, aip->ai_intf,
-                       sizeof(local_addr.sa_data));
+       strncat(local_addr.sa_data, aip->ai_intf, sizeof(local_addr.sa_data));
        sn = strdup(local_addr.sa_data);
        if (!sn)
                atmarp_mem_err("atmarp_scsp_connect: strdup");
@@ -696,7 +695,7 @@ atmarp_scsp_connect(Atmarp_intf *aip)
        return(0);
 
 scsp_connect_fail:
-       (void)close(sd);
+       close(sd);
        aip->ai_scsp_sock = -1;
        UM_FREE(sn);
        aip->ai_scsp_sockname = NULL;
@@ -722,9 +721,9 @@ atmarp_scsp_close(Atmarp_intf *aip)
        /*
         * Close and unlink the SCSP socket
         */
-       (void)close(aip->ai_scsp_sock);
+       close(aip->ai_scsp_sock);
        aip->ai_scsp_sock = -1;
-       (void)unlink(aip->ai_scsp_sockname);
+       unlink(aip->ai_scsp_sockname);
        UM_FREE(aip->ai_scsp_sockname);
        aip->ai_scsp_sockname = NULL;
 
index c873939..03ec5d7 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/atmarpd/atmarp_subr.c,v 1.3 1999/08/28 01:15:30 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/atmarpd/atmarp_subr.c,v 1.3 2003/11/15 20:33:42 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/atmarpd/atmarp_subr.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 
@@ -526,7 +526,7 @@ atmarp_update_kernel(Atmarp *aap)
                rc = errno;
        }
 
-       (void)close(sd);
+       close(sd);
        return(rc);
 }
 
@@ -929,5 +929,5 @@ atmarp_sigint(int sig)
        /*
         * Close the output file
         */
-       (void)fclose(df);
+       fclose(df);
 }
index d89f804..dbe562b 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/atmarpd/atmarp_timer.c,v 1.3 1999/08/28 01:15:30 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/atmarpd/atmarp_timer.c,v 1.3 2003/11/15 20:33:42 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/atmarpd/atmarp_timer.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 /*
@@ -88,13 +88,13 @@ atmarp_cache_timeout(Harp_timer *tp)
                         * a connection to SCSP--make a connection
                         */
                        if (aip->ai_state == AI_STATE_NULL)
-                               (void)atmarp_scsp_connect(aip);
+                               atmarp_scsp_connect(aip);
                } else {
                        /*
                         * The interface is down--disconnect from SCSP
                         */
                        if (aip->ai_state != AI_STATE_NULL)
-                               (void)atmarp_scsp_disconnect(aip);
+                               atmarp_scsp_disconnect(aip);
                }
        }
 
@@ -205,7 +205,7 @@ atmarp_keepalive_timeout(Harp_timer *tp)
        /*
         * Send the message to SCSP
         */
-       (void)atmarp_scsp_out(aip, (char *)msg, msg->si_len);
+       atmarp_scsp_out(aip, (char *)msg, msg->si_len);
        UM_FREE(msg);
 
        /*
index df7e676..fd92a17 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/atmarpd/atmarpd.c,v 1.3.2.1 2000/12/11 01:03:29 obrien Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/atmarpd/atmarpd.c,v 1.3 2003/11/15 20:33:42 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/atmarpd/atmarpd.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 /*
@@ -347,7 +347,7 @@ main(int argc, char **argv)
         */
        for (aip = atmarp_intf_head; aip; aip = aip->ai_next) {
                if (atmarp_if_ready(aip)) {
-                       (void)atmarp_scsp_connect(aip);
+                       atmarp_scsp_connect(aip);
                }
        }
 
index 312d832..90abe90 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_cafsm.c,v 1.3 1999/08/28 01:15:32 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_cafsm.c,v 1.4 2003/11/15 20:33:43 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_cafsm.c,v 1.5 2004/12/18 22:48:02 swildner Exp $
  */
 
 
@@ -346,7 +346,7 @@ scsp_ca_act_03(Scsp_dcs *dcsp, void *p)
                 * Set the new state
                 */
                dcsp->sd_ca_state = SCSP_CAFSM_SLAVE;
-               (void)scsp_cfsm(dcsp, SCSP_CIFSM_CA_SUMM,
+               scsp_cfsm(dcsp, SCSP_CIFSM_CA_SUMM,
                                (Scsp_msg *)0, (Scsp_if_msg *)0);
 
                /*
@@ -495,7 +495,7 @@ scsp_ca_act_04(Scsp_dcs *dcsp, void *p)
                         * Go to Cache Update state
                         */
                        dcsp->sd_ca_state = SCSP_CAFSM_UPDATE;
-                       (void)scsp_cfsm(dcsp, SCSP_CIFSM_CA_UPD,
+                       scsp_cfsm(dcsp, SCSP_CIFSM_CA_UPD,
                                        (Scsp_msg *)0,
                                        (Scsp_if_msg *)0);
                        rc = scsp_send_csus(dcsp);
@@ -612,7 +612,7 @@ scsp_ca_act_05(Scsp_dcs *dcsp, void *p)
                        HARP_TIMER(&dcsp->sd_ca_rexmt_t,
                                        dcsp->sd_ca_rexmt_int,
                                        scsp_ca_retran_timeout);
-                       (void)scsp_cfsm(dcsp, SCSP_CIFSM_CA_UPD,
+                       scsp_cfsm(dcsp, SCSP_CIFSM_CA_UPD,
                                        (Scsp_msg *)0,
                                        (Scsp_if_msg *)0);
                        rc = scsp_send_csus(dcsp);
index 1cbba6a..238d2c9 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_msg.c,v 1.3 1999/08/28 01:15:33 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_msg.c,v 1.3 2003/11/15 20:33:43 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_msg.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 
@@ -175,7 +175,7 @@ scsp_csus_ack(Scsp_dcs *dcsp, Scsp_msg *msg)
                 * If the CRL isn't empty, send another CSUS
                 */
                if (dcsp->sd_crl) {
-                       (void)scsp_send_csus(dcsp);
+                       scsp_send_csus(dcsp);
                }
        }
 }
index 46bcc3d..d764b15 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_output.c,v 1.3 1999/08/28 01:15:33 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_output.c,v 1.3 2003/11/15 20:33:43 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_output.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 /*
@@ -880,14 +880,13 @@ scsp_send_msg(Scsp_dcs *dcsp, Scsp_msg *msg)
                /*
                 * There was an error on the write--close the VCC
                 */
-               (void)close(dcsp->sd_sock);
+               close(dcsp->sd_sock);
                dcsp->sd_sock = -1;
 
                /*
                 * Inform the Hello FSM
                 */
-               (void)scsp_hfsm(dcsp, SCSP_HFSM_VC_CLOSED,
-                               (Scsp_msg *)0);
+               scsp_hfsm(dcsp, SCSP_HFSM_VC_CLOSED, (Scsp_msg *)0);
 
                /*
                 * Set the return code
index 3a7620c..a08576a 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_print.c,v 1.3 1999/08/28 01:15:34 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_print.c,v 1.3 2003/11/15 20:33:43 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_print.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 
@@ -760,7 +760,7 @@ print_scsp_msg(FILE *fp, Scsp_msg *msg)
        }
        dec_indent();
 
-       (void)fflush(fp);
+       fflush(fp);
 }
 
 
@@ -873,7 +873,7 @@ print_scsp_if_msg(FILE *fp, Scsp_if_msg *imsg)
        }
        dec_indent();
 
-       (void)fflush(fp);
+       fflush(fp);
 }
 
 
@@ -1250,5 +1250,5 @@ print_scsp_dump(void)
        /*
         * Close the output file
         */
-       (void)fclose(df);
+       fclose(df);
 }
index 32f273e..6b882c0 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_socket.c,v 1.3 1999/08/28 01:15:34 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_socket.c,v 1.3 2003/11/15 20:33:43 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_socket.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 
@@ -373,7 +373,7 @@ connect_fail:
        /*
         * Close the socket if something didn't work
         */
-       (void)close(sd);
+       close(sd);
        dcsp->sd_sock = -1;
        if (rc == 0)
                rc = EFAULT;
@@ -554,7 +554,7 @@ listen_fail:
        /*
         * Close the socket if anything didn't work
         */
-       (void)close(sd);
+       close(sd);
        if (rc == 0)
                errno = EFAULT;
        else
@@ -684,7 +684,7 @@ dcs_accept_fail:
        /*
         * An error has occured--clean up and return
         */
-       (void)close(sd);
+       close(sd);
        return((Scsp_dcs *)0);
 }
 
@@ -844,7 +844,7 @@ scsp_server_listen(void)
         */
        rc = bind(sd, &scsp_addr, sizeof(scsp_addr));
        if (rc == -1) {
-               (void)close(sd);
+               close(sd);
                return(-1);
        }
 
@@ -857,7 +857,7 @@ scsp_server_listen(void)
                rc = fcntl(sd, F_SETFL, O_NONBLOCK);
 #endif
        if (rc == -1) {
-               (void)close(sd);
+               close(sd);
                return(-1);
        }
 
@@ -865,7 +865,7 @@ scsp_server_listen(void)
         * Listen for new connections
         */
        if (listen(sd, 5) < 0) {
-               (void)close(sd);
+               close(sd);
                return(-1);
        }
 
@@ -917,7 +917,7 @@ scsp_server_accept(int ls)
        rc = fcntl(sd, F_SETFL, O_NONBLOCK);
 #endif
        if (rc == -1) {
-               (void)close(sd);
+               close(sd);
                rc = errno;
        }
 
@@ -1300,15 +1300,15 @@ config_reject:
        msg->si_type = SCSP_CFG_RSP;
        msg->si_rc = SCSP_RSP_REJ;
        msg->si_len = sizeof(Scsp_if_msg_hdr);
-       (void)scsp_if_sock_write(ssp->ss_sock, msg);
+       scsp_if_sock_write(ssp->ss_sock, msg);
 
 config_error:
        if (ssp->ss_sock != -1) {
-               (void)close(ssp->ss_sock);
+               close(ssp->ss_sock);
                ssp->ss_sock = -1;
        }
        if (ssp->ss_dcs_lsock != -1) {
-               (void)close(ssp->ss_dcs_lsock);
+               close(ssp->ss_dcs_lsock);
                ssp->ss_sock = -1;
        }
        ssp->ss_state = SCSP_SS_NULL;
@@ -1320,7 +1320,7 @@ pending_read_fail:
        /*
         * Close the socket and free the pending read block
         */
-       (void)close(psp->sp_sock);
+       close(psp->sp_sock);
        UNLINK(psp, Scsp_pending, scsp_pending_head, sp_next);
        UM_FREE(psp);
        if (msg)
index 8dcac54..95b8535 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_subr.c,v 1.3 1999/08/28 01:15:34 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_subr.c,v 1.3 2003/11/15 20:33:43 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_subr.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 
@@ -469,7 +469,7 @@ scsp_dcs_delete(Scsp_dcs *dcsp)
         * Close the VCC to the DCS, if one is open
         */
        if (dcsp->sd_sock != -1) {
-               (void)close(dcsp->sd_sock);
+               close(dcsp->sd_sock);
        }
 
        /*
@@ -566,7 +566,7 @@ scsp_server_shutdown(Scsp_server *ssp)
         */
        for (dcsp = ssp->ss_dcs; dcsp; dcsp = dcsp->sd_next) {
                if (dcsp->sd_sock != -1) {
-                       (void)close(dcsp->sd_sock);
+                       close(dcsp->sd_sock);
                        dcsp->sd_sock = -1;
                }
                HARP_CANCEL(&dcsp->sd_open_t);
@@ -582,11 +582,11 @@ scsp_server_shutdown(Scsp_server *ssp)
         * Clean up the server control block
         */
        if (ssp->ss_sock != -1) {
-               (void)close(ssp->ss_sock);
+               close(ssp->ss_sock);
                ssp->ss_sock = -1;
        }
        if (ssp->ss_dcs_lsock != -1) {
-               (void)close(ssp->ss_dcs_lsock);
+               close(ssp->ss_dcs_lsock);
                ssp->ss_dcs_lsock = -1;
        }
        ssp->ss_state = SCSP_SS_NULL;
index 604ab87..8e3a514 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_timer.c,v 1.3 1999/08/28 01:15:34 peter Exp $
- *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_timer.c,v 1.3 2003/11/15 20:33:43 eirikn Exp $
+ *     @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_timer.c,v 1.4 2004/12/18 22:48:02 swildner Exp $
  */
 
 /*
@@ -122,7 +122,7 @@ scsp_hello_timeout(Harp_timer *stp)
        /*
         * Call the Hello FSM
         */
-       (void)scsp_hfsm(dcsp, SCSP_HFSM_HELLO_T, (Scsp_msg *)0);
+       scsp_hfsm(dcsp, SCSP_HFSM_HELLO_T, (Scsp_msg *)0);
 
        return;
 }
@@ -156,7 +156,7 @@ scsp_hello_rcv_timeout(Harp_timer *stp)
        /*
         * Call the Hello FSM
         */
-       (void)scsp_hfsm(dcsp, SCSP_HFSM_RCV_T, (void *)0);
+       scsp_hfsm(dcsp, SCSP_HFSM_RCV_T, (void *)0);
 
        return;
 }
@@ -186,7 +186,7 @@ scsp_ca_retran_timeout(Harp_timer *stp)
        /*
         * Call the CA FSM
         */
-       (void)scsp_cafsm(dcsp, SCSP_CAFSM_CA_T, (void *)0);
+       scsp_cafsm(dcsp, SCSP_CAFSM_CA_T, (void *)0);
 
        return;
 }
@@ -216,7 +216,7 @@ scsp_csus_retran_timeout(Harp_timer *stp)
        /*
         * Call the CA FSM
         */
-       (void)scsp_cafsm(dcsp, SCSP_CAFSM_CSUS_T, (void *)0);
+       scsp_cafsm(dcsp, SCSP_CAFSM_CSUS_T, (void *)0);
 
        return;
 }
@@ -248,7 +248,7 @@ scsp_csu_req_retran_timeout(Harp_timer *stp)
        /*
         * Call the CA FSM
         */
-       (void)scsp_cafsm(dcsp, SCSP_CAFSM_CSU_T, (void *)rxp);
+       scsp_cafsm(dcsp, SCSP_CAFSM_CSU_T, (void *)rxp);
 
        return;
 }
index 2d66564..7f8bf48 100644 (file)
@@ -1,5 +1,5 @@
 /*     $OpenBSD: authpf.c,v 1.75 2004/01/29 01:55:10 deraadt Exp $     */
-/*     $DragonFly: src/usr.sbin/authpf/authpf.c,v 1.1 2004/09/21 21:25:28 joerg Exp $ */
+/*     $DragonFly: src/usr.sbin/authpf/authpf.c,v 1.2 2004/12/18 22:48:02 swildner Exp $ */
 
 /*
  * Copyright (C) 1998 - 2002 Bob Beck (beck@openbsd.org).
@@ -266,7 +266,7 @@ main(int argc __unused, char **argv __unused)
        rewind(pidfp);
        fprintf(pidfp, "%ld\n%s\n", (long)getpid(), luser);
        fflush(pidfp);
-       (void) ftruncate(fileno(pidfp), ftell(pidfp));
+       ftruncate(fileno(pidfp), ftell(pidfp));
 
        if (change_filter(1, luser, ipsrc) == -1) {
                printf("Unable to modify filters\r\n");
index 64ca61b..2296a43 100644 (file)
@@ -9,7 +9,7 @@ use and modify. Please send modifications and/or suggestions + bug fixes to
 
 /*
  * $FreeBSD: src/usr.sbin/bootparamd/bootparamd/main.c,v 1.9 1999/08/28 01:15:39 peter Exp $
- * $DragonFly: src/usr.sbin/bootparamd/bootparamd/main.c,v 1.4 2003/11/15 23:33:35 eirikn Exp $
+ * $DragonFly: src/usr.sbin/bootparamd/bootparamd/main.c,v 1.5 2004/12/18 22:48:02 swildner Exp $
  */
 #include <ctype.h>
 #include <err.h>
@@ -95,7 +95,7 @@ main(int argc, char **argv)
        }
 
 
-       (void)pmap_unset(BOOTPARAMPROG, BOOTPARAMVERS);
+       pmap_unset(BOOTPARAMPROG, BOOTPARAMVERS);
 
        transp = svcudp_create(RPC_ANYSOCK);
        if (transp == NULL)
index 8dc5a1b..75457c0 100644 (file)
@@ -18,7 +18,7 @@
  *              Some code style reformatting.
  *
  * $FreeBSD: src/usr.sbin/cdcontrol/cdcontrol.c,v 1.24.2.11 2002/11/20 00:26:19 njl Exp $
- * $DragonFly: src/usr.sbin/cdcontrol/cdcontrol.c,v 1.5 2003/11/15 23:33:35 eirikn Exp $
+ * $DragonFly: src/usr.sbin/cdcontrol/cdcontrol.c,v 1.6 2004/12/18 22:48:02 swildner Exp $
  */
 
 #include <sys/cdio.h>
@@ -337,7 +337,7 @@ run(int cmd, char *arg)
 
                rc = ioctl (fd, CDIOCSTOP);
 
-               (void) ioctl (fd, CDIOCALLOW);
+               ioctl (fd, CDIOCALLOW);
 
                return (rc);
 
@@ -370,7 +370,7 @@ run(int cmd, char *arg)
                if (fd < 0 && ! open_cd ())
                        return (0);
 
-               (void) ioctl (fd, CDIOCALLOW);
+               ioctl (fd, CDIOCALLOW);
                rc = ioctl (fd, CDIOCEJECT);
                if (rc < 0)
                        return (rc);
@@ -380,7 +380,7 @@ run(int cmd, char *arg)
                if (fd < 0 && ! open_cd ())
                        return (0);
 
-               (void) ioctl (fd, CDIOCALLOW);
+               ioctl (fd, CDIOCALLOW);
                rc = ioctl (fd, CDIOCCLOSE);
                if (rc < 0)
                        return (rc);
index 7f53352..2c8ca3a 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1988, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)chown.c 8.8 (Berkeley) 4/4/94
  * $FreeBSD: src/usr.sbin/chown/chown.c,v 1.15.2.3 2002/08/07 21:24:33 schweikh Exp $
- * $DragonFly: src/usr.sbin/chown/chown.c,v 1.7 2004/11/28 16:51:50 joerg Exp $
+ * $DragonFly: src/usr.sbin/chown/chown.c,v 1.8 2004/12/18 22:48:02 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -179,7 +179,7 @@ main(int argc, char **argv)
                                rval = 1;
                        } else {
                                if (vflag)
-                                       (void)printf("%s\n", p->fts_accpath);
+                                       printf("%s\n", p->fts_accpath);
                        }
                } else {
                        if (chown(p->fts_accpath, uid, gid) && !fflag) {
@@ -187,7 +187,7 @@ main(int argc, char **argv)
                                rval = 1;
                        } else {
                                if (vflag) {
-                                       (void)printf("%s", p->fts_accpath);
+                                       printf("%s", p->fts_accpath);
                                         if (vflag > 1) {
                                                if (ischown) {
                                                        printf(": %d:%d -> %d:%d",
@@ -283,7 +283,7 @@ chownerr(const char *file)
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "%s\n%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n%s\n",
            "usage: chown [-R [-H | -L | -P]] [-f] [-h] [-v] owner[:group] file ...",
            "       chown [-R [-H | -L | -P]] [-f] [-h] [-v] :group file ...",
            "       chgrp [-R [-H | -L | -P]] [-f] [-h] [-v] group file ...");
index 8e78444..0714471 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1988, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)chroot.c        8.1 (Berkeley) 6/9/93
  * $FreeBSD: src/usr.sbin/chroot/chroot.c,v 1.4.2.1 2002/03/15 22:54:59 mikeh Exp $
- * $DragonFly: src/usr.sbin/chroot/chroot.c,v 1.6 2004/11/28 16:38:21 liamfoy Exp $
+ * $DragonFly: src/usr.sbin/chroot/chroot.c,v 1.7 2004/12/18 22:48:02 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -169,7 +169,7 @@ main(int argc, char **argv)
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: chroot [-g group] [-G group,group,...] "
+       fprintf(stderr, "usage: chroot [-g group] [-G group,group,...] "
            "[-u user] newroot [command]\n");
        exit(1);
 }
index 74f298c..ae09be7 100644 (file)
@@ -25,7 +25,7 @@
  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/ckdist/ckdist.c,v 1.3.2.1 2000/07/01 10:37:21 ps Exp $
- * $DragonFly: src/usr.sbin/ckdist/ckdist.c,v 1.2 2003/06/17 04:29:52 dillon Exp $
+ * $DragonFly: src/usr.sbin/ckdist/ckdist.c,v 1.3 2004/12/18 22:48:02 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -193,7 +193,7 @@ ckdist(const char *path, int type)
        if (!type)
            if ((c = fgetc(fp)) != EOF) {
                type = c == 'M' ? DISTMD5 : c == 'P' ? DISTINF : 0;
-               (void)ungetc(c, fp);
+               ungetc(c, fp);
            }
     }
     switch (type) {
index 87fb6c1..8c9612e 100644 (file)
@@ -25,7 +25,7 @@
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $Id: clog.c,v 1.3 2001/10/02 18:51:26 jdw Exp $
- * $DragonFly: src/usr.sbin/clog/clog.c,v 1.1 2004/10/30 20:26:46 dillon Exp $
+ * $DragonFly: src/usr.sbin/clog/clog.c,v 1.2 2004/12/18 22:48:03 swildner Exp $
  */
 
 
@@ -169,8 +169,8 @@ void read_log(const char *lname, int optf) {
                }
        }
        
-       (void)munmap(pbuffer,sb.st_size);
-       (void)close(fd);
+       munmap(pbuffer,sb.st_size);
+       close(fd);
 
        exit(0);
 }
@@ -185,7 +185,7 @@ void init_log(const char *lname, size_t size) {
        memcpy(&cf.cf_magic,MAGIC_CONST,4);
        cf.cf_max = size - sizeof(struct clog_footer);
 
-       (void)memset(buffer,0,BUFFER_SIZE);
+       memset(buffer,0,BUFFER_SIZE);
 
        fd = open(lname,O_RDWR|O_CREAT,0666); 
        if (fd==-1) {
@@ -219,7 +219,7 @@ void init_log(const char *lname, size_t size) {
                fprintf(stderr,"%s: ERROR: could not write magic in %s (%s)\n",pname,lname,strerror(errno));
                exit(7);
        }
-       (void)close(fd);
+       close(fd);
        exit(0);
 }
 
index 9d211b6..0d2c36e 100644 (file)
@@ -15,7 +15,7 @@
  * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
  *
  * $FreeBSD: src/usr.sbin/cron/cron/cron.c,v 1.9.2.2 2001/05/28 23:37:26 babkin Exp $
- * $DragonFly: src/usr.sbin/cron/cron/cron.c,v 1.5 2004/03/10 18:27:26 dillon Exp $
+ * $DragonFly: src/usr.sbin/cron/cron/cron.c,v 1.6 2004/12/18 22:48:03 swildner Exp $
  */
 
 #define        MAIN_PROGRAM
@@ -77,11 +77,11 @@ main(int argc, char **argv)
        parse_args(argc, argv);
 
 #ifdef USE_SIGCHLD
-       (void) signal(SIGCHLD, sigchld_handler);
+       signal(SIGCHLD, sigchld_handler);
 #else
-       (void) signal(SIGCLD, SIG_IGN);
+       signal(SIGCLD, SIG_IGN);
 #endif
-       (void) signal(SIGHUP, sighup_handler);
+       signal(SIGHUP, sighup_handler);
 
        acquire_daemonlock(0);
        set_cron_uid();
@@ -98,7 +98,7 @@ main(int argc, char **argv)
 # else
        if (0) {
 # endif
-               (void) fprintf(stderr, "[%d] cron started\n", getpid());
+               fprintf(stderr, "[%d] cron started\n", getpid());
        } else {
                if (daemon(1, 0) == -1) {
                        log_it("CRON",getpid(),"DEATH","can't become daemon");
@@ -145,7 +145,7 @@ run_reboot_jobs(cron_db *db)
                        }
                }
        }
-       (void) job_runqueue();
+       job_runqueue();
 }
 
 
index 7c64670..8c244da 100644 (file)
@@ -15,7 +15,7 @@
  * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
  *
  * $FreeBSD: src/usr.sbin/cron/cron/database.c,v 1.8 1999/08/28 01:15:50 peter Exp $
- * $DragonFly: src/usr.sbin/cron/cron/database.c,v 1.4 2003/11/16 11:51:14 eirikn Exp $
+ * $DragonFly: src/usr.sbin/cron/cron/database.c,v 1.5 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* vix 26jan87 [RCS has the log]
@@ -54,7 +54,7 @@ load_database(cron_db *old_db)
         */
        if (stat(SPOOL_DIR, &statbuf) < OK) {
                log_it("CRON", getpid(), "STAT FAILED", SPOOL_DIR);
-               (void) exit(ERROR_EXIT);
+               exit(ERROR_EXIT);
        }
 
        /* track system crontab file
@@ -95,7 +95,7 @@ load_database(cron_db *old_db)
         */
        if (!(dir = opendir(SPOOL_DIR))) {
                log_it("CRON", getpid(), "OPENDIR FAILED", SPOOL_DIR);
-               (void) exit(ERROR_EXIT);
+               exit(ERROR_EXIT);
        }
 
        while (NULL != (dp = readdir(dir))) {
@@ -110,9 +110,9 @@ load_database(cron_db *old_db)
                if (dp->d_name[0] == '.')
                        continue;
 
-               (void) strncpy(fname, dp->d_name, sizeof(fname));
+               strncpy(fname, dp->d_name, sizeof(fname));
                fname[sizeof(fname)-1] = '\0';
-               (void) snprintf(tabname, sizeof tabname, CRON_TAB(fname));
+               snprintf(tabname, sizeof tabname, CRON_TAB(fname));
 
                process_crontab(fname, fname, tabname,
                                &statbuf, &new_db, old_db);
index faac1cf..1b9e93e 100644 (file)
@@ -15,7 +15,7 @@
  * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
  *
  * $FreeBSD: src/usr.sbin/cron/cron/do_command.c,v 1.15.2.5 2001/05/04 00:59:40 peter Exp $
- * $DragonFly: src/usr.sbin/cron/cron/do_command.c,v 1.5 2004/03/10 18:27:26 dillon Exp $
+ * $DragonFly: src/usr.sbin/cron/cron/do_command.c,v 1.6 2004/12/18 22:48:03 swildner Exp $
  */
 
 #include "cron.h"
@@ -97,13 +97,13 @@ child_process(entry *e, user *u)
         * use wait() explictly.  so we have to disable the signal (which
         * was inherited from the parent).
         */
-       (void) signal(SIGCHLD, SIG_DFL);
+       signal(SIGCHLD, SIG_DFL);
 #else
        /* on system-V systems, we are ignoring SIGCLD.  we have to stop
         * ignoring it now or the wait() in cron_pclose() won't work.
         * because of this, we have to wait() for our children here, as well.
         */
-       (void) signal(SIGCLD, SIG_DFL);
+       signal(SIGCLD, SIG_DFL);
 #endif /*BSD*/
 
        /* create some pipes to talk to our future child
@@ -179,7 +179,7 @@ child_process(entry *e, user *u)
 
                /* get new pgrp, void tty, etc.
                 */
-               (void) setsid();
+               setsid();
 
                /* close the pipe ends that we won't use.  this doesn't affect
                 * the parent, who has to read and write them; it keeps the
@@ -223,10 +223,10 @@ child_process(entry *e, user *u)
                if (pwd &&
                    setusercontext(lc, pwd, e->uid,
                            LOGIN_SETALL & ~(LOGIN_SETPATH|LOGIN_SETENV)) == 0)
-                       (void) endpwent();
+                       endpwent();
                else {
                        /* fall back to the old method */
-                       (void) endpwent();
+                       endpwent();
 # endif
                        /* set our directory, uid and gid.  Set gid first,
                         * since once we set uid, we've lost root privledges.
@@ -408,12 +408,12 @@ child_process(entry *e, user *u)
                                char mailcmd[MAX_COMMAND];
                                char hostname[MAXHOSTNAMELEN];
 
-                               (void) gethostname(hostname, MAXHOSTNAMELEN);
-                               (void) snprintf(mailcmd, sizeof(mailcmd),
-                                              MAILARGS, MAILCMD);
+                               gethostname(hostname, MAXHOSTNAMELEN);
+                               snprintf(mailcmd, sizeof(mailcmd),
+                                        MAILARGS, MAILCMD);
                                if (!(mail = cron_popen(mailcmd, "w", e))) {
                                        warn("%s", MAILCMD);
-                                       (void) _exit(ERROR_EXIT);
+                                       _exit(ERROR_EXIT);
                                }
                                fprintf(mail, "From: %s (Cron Daemon)\n", usernm);
                                fprintf(mail, "To: %s\n", mailto);
@@ -522,7 +522,7 @@ do_univ(user *u)
        int     i;
 
        p = getpwuid(u->uid);
-       (void) endpwent();
+       endpwent();
 
        if (p == NULL)
                return;
@@ -538,6 +538,6 @@ do_univ(user *u)
        if (strcmp(s, "universe(att)"))
                return;
 
-       (void) universe(U_ATT);
+       universe(U_ATT);
 #endif
 }
index 497e9e1..fe0cad5 100644 (file)
@@ -19,7 +19,7 @@
  *
  * @(#)popen.c 5.7 (Berkeley) 2/14/89
  * $FreeBSD: src/usr.sbin/cron/cron/popen.c,v 1.7.2.3 2000/12/11 01:03:31 obrien Exp $
- * $DragonFly: src/usr.sbin/cron/cron/popen.c,v 1.4 2004/03/10 18:27:26 dillon Exp $
+ * $DragonFly: src/usr.sbin/cron/cron/popen.c,v 1.5 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* this came out of the ftpd sources; it's been modified to avoid the
@@ -107,8 +107,8 @@ cron_popen(char *program, char *type, entry *e)
        iop = NULL;
        switch(pid = vfork()) {
        case -1:                        /* error */
-               (void)close(pdes[0]);
-               (void)close(pdes[1]);
+               close(pdes[0]);
+               close(pdes[1]);
                goto pfree;
                /* NOTREACHED */
        case 0:                         /* child */
@@ -119,29 +119,29 @@ cron_popen(char *program, char *type, entry *e)
 
                        /* get new pgrp, void tty, etc.
                         */
-                       (void) setsid();
+                       setsid();
                }
                if (*type == 'r') {
                        /* Do not share our parent's stdin */
-                       (void)close(0);
-                       (void)open(_PATH_DEVNULL, O_RDWR);
+                       close(0);
+                       open(_PATH_DEVNULL, O_RDWR);
                        if (pdes[1] != 1) {
                                dup2(pdes[1], 1);
                                dup2(pdes[1], 2);       /* stderr, too! */
-                               (void)close(pdes[1]);
+                               close(pdes[1]);
                        }
-                       (void)close(pdes[0]);
+                       close(pdes[0]);
                } else {
                        if (pdes[0] != 0) {
                                dup2(pdes[0], 0);
-                               (void)close(pdes[0]);
+                               close(pdes[0]);
                        }
                        /* Hack: stdout gets revoked */
-                       (void)close(1);
-                       (void)open(_PATH_DEVNULL, O_RDWR);
-                       (void)close(2);
-                       (void)open(_PATH_DEVNULL, O_RDWR);
-                       (void)close(pdes[1]);
+                       close(1);
+                       open(_PATH_DEVNULL, O_RDWR);
+                       close(2);
+                       open(_PATH_DEVNULL, O_RDWR);
+                       close(pdes[1]);
                }
 # if defined(LOGIN_CAP)
                if (e != NULL) {
@@ -160,10 +160,10 @@ cron_popen(char *program, char *type, entry *e)
                        if (pwd &&
                            setusercontext(lc, pwd, e->uid,
                                    LOGIN_SETALL & ~(LOGIN_SETPATH|LOGIN_SETENV)) == 0)
-                               (void) endpwent();
+                               endpwent();
                        else {
                                /* fall back to the old method */
-                               (void) endpwent();
+                               endpwent();
 # endif
                                /* set our directory, uid and gid.  Set gid first,
                                 * since once we set uid, we've lost root privledges.
@@ -191,10 +191,10 @@ cron_popen(char *program, char *type, entry *e)
        /* parent; assume fdopen can't fail...  */
        if (*type == 'r') {
                iop = fdopen(pdes[0], type);
-               (void)close(pdes[1]);
+               close(pdes[1]);
        } else {
                iop = fdopen(pdes[1], type);
-               (void)close(pdes[0]);
+               close(pdes[0]);
        }
        pids[fileno(iop)] = pid;
 
@@ -222,11 +222,11 @@ cron_pclose(FILE *iop)
         */
        if (pids == 0 || pids[fdes = fileno(iop)] == 0)
                return(-1);
-       (void)fclose(iop);
+       fclose(iop);
        omask = sigblock(sigmask(SIGINT)|sigmask(SIGQUIT)|sigmask(SIGHUP));
        while ((pid = wait(&stat_loc)) != pids[fdes] && pid != -1)
                ;
-       (void)sigsetmask(omask);
+       sigsetmask(omask);
        pids[fdes] = 0;
        return (pid == -1 ? -1 : WEXITSTATUS(stat_loc));
 }
index 1207fab..2b67265 100644 (file)
@@ -16,7 +16,7 @@
  *
  * From Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp
  * $FreeBSD: src/usr.sbin/cron/crontab/crontab.c,v 1.12.2.4 2001/06/16 03:18:37 peter Exp $
- * $DragonFly: src/usr.sbin/cron/crontab/crontab.c,v 1.4 2003/11/16 11:51:14 eirikn Exp $
+ * $DragonFly: src/usr.sbin/cron/crontab/crontab.c,v 1.5 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* crontab - install and manage per-user crontab files
@@ -24,7 +24,7 @@
  * vix 26jan87 [original]
  */
 
-static char version[] = "$DragonFly: src/usr.sbin/cron/crontab/crontab.c,v 1.4 2003/11/16 11:51:14 eirikn Exp $";
+static char version[] = "$DragonFly: src/usr.sbin/cron/crontab/crontab.c,v 1.5 2004/12/18 22:48:03 swildner Exp $";
 
 #define        MAIN_PROGRAM
 
@@ -131,7 +131,7 @@ parse_args(int argc, char **argv)
 
        if (!(pw = getpwuid(getuid())))
                errx(ERROR_EXIT, "your UID isn't in the passwd file, bailing out");
-       (void) strncpy(User, pw->pw_name, (sizeof User)-1);
+       strncpy(User, pw->pw_name, (sizeof User)-1);
        User[(sizeof User)-1] = '\0';
        strcpy(RealUser, User);
        Filename[0] = '\0';
@@ -147,7 +147,7 @@ parse_args(int argc, char **argv)
                                errx(ERROR_EXIT, "must be privileged to use -u");
                        if (!(pw = getpwnam(optarg)))
                                errx(ERROR_EXIT, "user `%s' unknown", optarg);
-                       (void) strncpy(User, pw->pw_name, (sizeof User)-1);
+                       strncpy(User, pw->pw_name, (sizeof User)-1);
                        User[(sizeof User)-1] = '\0';
                        break;
                case 'l':
@@ -179,7 +179,7 @@ parse_args(int argc, char **argv)
        } else {
                if (argv[optind] != NULL) {
                        Option = opt_replace;
-                       (void) strncpy (Filename, argv[optind], (sizeof Filename)-1);
+                       strncpy (Filename, argv[optind], (sizeof Filename)-1);
                        Filename[(sizeof Filename)-1] = '\0';
 
                } else {
@@ -225,7 +225,7 @@ list_cmd(void)
        int     ch, x;
 
        log_it(RealUser, Pid, "LIST", User);
-       (void) sprintf(n, CRON_TAB(User));
+       sprintf(n, CRON_TAB(User));
        if (!(f = fopen(n, "r"))) {
                if (errno == ENOENT)
                        errx(ERROR_EXIT, "no crontab for %s", User);
@@ -267,7 +267,7 @@ delete_cmd(void)
        int ch, first;
 
        if (isatty(STDIN_FILENO)) {
-               (void)fprintf(stderr, "remove crontab for %s? ", User);
+               fprintf(stderr, "remove crontab for %s? ", User);
                first = ch = getchar();
                while (ch != '\n' && ch != EOF)
                        ch = getchar();
@@ -276,7 +276,7 @@ delete_cmd(void)
        }
 
        log_it(RealUser, Pid, "DELETE", User);
-       (void) sprintf(n, CRON_TAB(User));
+       sprintf(n, CRON_TAB(User));
        if (unlink(n)) {
                if (errno == ENOENT)
                        errx(ERROR_EXIT, "no crontab for %s", User);
@@ -308,7 +308,7 @@ edit_cmd(void)
        mode_t          um;
 
        log_it(RealUser, Pid, "BEGIN EDIT", User);
-       (void) sprintf(n, CRON_TAB(User));
+       sprintf(n, CRON_TAB(User));
        if (!(f = fopen(n, "r"))) {
                if (errno != ENOENT)
                        err(ERROR_EXIT, "%s", n);
@@ -318,13 +318,13 @@ edit_cmd(void)
        }
 
        um = umask(077);
-       (void) sprintf(Filename, "/tmp/crontab.XXXXXXXXXX");
+       sprintf(Filename, "/tmp/crontab.XXXXXXXXXX");
        if ((t = mkstemp(Filename)) == -1) {
                warn("%s", Filename);
-               (void) umask(um);
+               umask(um);
                goto fatal;
        }
-       (void) umask(um);
+       umask(um);
 #ifdef HAS_FCHOWN
        if (fchown(t, getuid(), getgid()) < 0) {
 #else
@@ -456,7 +456,7 @@ edit_cmd(void)
                        printf("Do you want to retry the same edit? ");
                        fflush(stdout);
                        q[0] = '\0';
-                       (void) fgets(q, sizeof q, stdin);
+                       fgets(q, sizeof q, stdin);
                        switch (islower(q[0]) ? q[0] : tolower(q[0])) {
                        case 'y':
                                goto again;
@@ -501,8 +501,8 @@ replace_cmd(void)
                return (-2);
        }
 
-       (void) sprintf(n, "tmp.%d", Pid);
-       (void) sprintf(tn, CRON_TAB(n));
+       sprintf(n, "tmp.%d", Pid);
+       sprintf(tn, CRON_TAB(n));
        if (!(tmp = fopen(tn, "w+"))) {
                warn("%s", tn);
                return (-2);
@@ -589,7 +589,7 @@ replace_cmd(void)
                return (-2);
        }
 
-       (void) sprintf(n, CRON_TAB(User));
+       sprintf(n, CRON_TAB(User));
        if (rename(tn, n)) {
                warn("error renaming %s to %s", tn, n);
                unlink(tn);
@@ -610,7 +610,7 @@ poke_daemon(void)
        struct timeval tvs[2];
        struct timezone tz;
 
-       (void) gettimeofday(&tvs[0], &tz);
+       gettimeofday(&tvs[0], &tz);
        tvs[1] = tvs[0];
        if (utimes(SPOOL_DIR, tvs) < OK) {
                warn("can't update mtime on spooldir %s", SPOOL_DIR);
index 0fac4b3..e6e0220 100644 (file)
@@ -15,7 +15,7 @@
  * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
  *
  * $FreeBSD: src/usr.sbin/cron/lib/compat.c,v 1.6.2.1 2000/12/11 01:03:31 obrien Exp $
- * $DragonFly: src/usr.sbin/cron/lib/compat.c,v 1.3 2003/11/16 11:51:15 eirikn Exp $
+ * $DragonFly: src/usr.sbin/cron/lib/compat.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* vix 30dec93 [broke this out of misc.c - see RCS log for history]
@@ -57,7 +57,7 @@ strdup(char *str)
                errno = ENOMEM;
                return NULL;
        }
-       (void) strcpy(temp, str);
+       strcpy(temp, str);
        return temp;
 }
 #endif
@@ -108,15 +108,15 @@ setsid(void)
 #  endif
        if ((fd = open(_PATH_TTY, 2)) >= 0)
        {
-               (void) ioctl(fd, TIOCNOTTY, (char*)0);
-               (void) close(fd);
+               ioctl(fd, TIOCNOTTY, (char*)0);
+               close(fd);
        }
 # else /*BSD*/
        newpgrp = setpgrp();
 
-       (void) close(STDIN);    (void) open(_PATH_DEVNULL, 0);
-       (void) close(STDOUT);   (void) open(_PATH_DEVNULL, 1);
-       (void) close(STDERR);   (void) open(_PATH_DEVNULL, 2);
+       close(STDIN);   open(_PATH_DEVNULL, 0);
+       close(STDOUT);  open(_PATH_DEVNULL, 1);
+       close(STDERR);  open(_PATH_DEVNULL, 2);
 # endif /*BSD*/
        return newpgrp;
 }
index 43fde2c..209943d 100644 (file)
@@ -15,7 +15,7 @@
  * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
  *
  * $FreeBSD: src/usr.sbin/cron/lib/env.c,v 1.7.2.1 2000/07/01 10:35:07 ps Exp $
- * $DragonFly: src/usr.sbin/cron/lib/env.c,v 1.4 2004/03/10 18:27:28 dillon Exp $
+ * $DragonFly: src/usr.sbin/cron/lib/env.c,v 1.5 2004/12/18 22:48:03 swildner Exp $
  */
 
 #include "cron.h"
@@ -60,7 +60,7 @@ env_copy(char **envp)
        for (i = 0;  i < count;  i++)
                if ((p[i] = strdup(envp[i])) == NULL) {
                        while (--i >= 0)
-                               (void) free(p[i]);
+                               free(p[i]);
                        free(p);
                        errno = ENOMEM;
                        return NULL;
@@ -168,7 +168,7 @@ load_env(char *envstr, FILE *f)
                        if (val[0] == '\'' || val[0] == '"') {
                                if (val[len-1] == val[0]) {
                                        val[len-1] = '\0';
-                                       (void) strcpy(val, val+1);
+                                       strcpy(val, val+1);
                                }
                        }
                }
@@ -176,7 +176,7 @@ load_env(char *envstr, FILE *f)
 
        if (strlen(name) + 1 + strlen(val) >= MAX_ENVSTR-1)
                return (FALSE);
-       (void) sprintf(envstr, "%s=%s", name, val);
+       sprintf(envstr, "%s=%s", name, val);
        Debug(DPARS, ("load_env, <%s> <%s> -> <%s>\n", name, val, envstr))
        return (TRUE);
 }
index d40a2fb..f19b96e 100644 (file)
@@ -15,7 +15,7 @@
  * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
  *
  * $FreeBSD: src/usr.sbin/cron/lib/misc.c,v 1.8.2.2 2002/04/28 22:45:53 dwmalone Exp $
- * $DragonFly: src/usr.sbin/cron/lib/misc.c,v 1.4 2004/03/10 18:27:28 dillon Exp $
+ * $DragonFly: src/usr.sbin/cron/lib/misc.c,v 1.5 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* vix 26jan87 [RCS has the rest of the log]
@@ -240,7 +240,7 @@ acquire_daemonlock(int closeflag)
                char    buf[MAX_TEMPSTR];
                int     fd, otherpid;
 
-               (void) sprintf(pidfile, PIDFILE, PIDDIR);
+               sprintf(pidfile, PIDFILE, PIDDIR);
                if ((-1 == (fd = open(pidfile, O_RDWR|O_CREAT, 0644)))
                    || (NULL == (fp = fdopen(fd, "r+")))
                    ) {
@@ -260,13 +260,13 @@ acquire_daemonlock(int closeflag)
                        errx(ERROR_EXIT, "%s", buf);
                }
 
-               (void) fcntl(fd, F_SETFD, 1);
+               fcntl(fd, F_SETFD, 1);
        }
 
        rewind(fp);
        fprintf(fp, "%d\n", getpid());
        fflush(fp);
-       (void) ftruncate(fileno(fp), ftell(fp));
+       ftruncate(fileno(fp), ftell(fp));
 
        /* abandon fd and fp even though the file is open. we need to
         * keep it open and locked, but we don't need the handles elsewhere.
@@ -451,7 +451,7 @@ log_it(char *username, int xpid, char *event, char *detail)
                        if (LogFD < OK) {
                                warn("can't open log file %s", LOG_FILE);
                        } else {
-                               (void) fcntl(LogFD, F_SETFD, 1);
+                               fcntl(LogFD, F_SETFD, 1);
                        }
                }
 
@@ -606,15 +606,15 @@ arpadate(time_t *clock)
        if (tm->tm_year >= 100)
                tm->tm_year += 1900;
 
-       (void) snprintf(ret, sizeof(ret), "%s, %2d %s %d %02d:%02d:%02d %s",
-                      DowNames[tm->tm_wday],
-                      tm->tm_mday,
-                      MonthNames[tm->tm_mon],
-                      tm->tm_year,
-                      tm->tm_hour,
-                      tm->tm_min,
-                      tm->tm_sec,
-                      TZONE(*tm));
+       snprintf(ret, sizeof(ret), "%s, %2d %s %d %02d:%02d:%02d %s",
+                DowNames[tm->tm_wday],
+                tm->tm_mday,
+                MonthNames[tm->tm_mon],
+                tm->tm_year,
+                tm->tm_hour,
+                tm->tm_min,
+                tm->tm_sec,
+                TZONE(*tm));
        return ret;
 }
 #endif /*MAIL_DATE*/
index 92e55dc..4ab34ef 100644 (file)
@@ -27,7 +27,7 @@
  *
  *     From BSDI: daemon.c,v 1.2 1996/08/15 01:11:09 jch Exp
  * $FreeBSD: src/usr.sbin/daemon/daemon.c,v 1.1.2.1 2002/08/28 17:25:54 sheldonh Exp $
- * $DragonFly: src/usr.sbin/daemon/daemon.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
+ * $DragonFly: src/usr.sbin/daemon/daemon.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -74,6 +74,6 @@ main(int argc, char *argv[])
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: daemon [-cf] command arguments ...\n");
+       fprintf(stderr, "usage: daemon [-cf] command arguments ...\n");
        exit(1);
 }
index 0c9caa9..2fe4f9b 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/dpt/dpt_ctlinfo/dpt_ctlinfo.c,v 1.3 1999/08/28 01:16:06 peter Exp $
- * $DragonFly: src/usr.sbin/dpt/dpt_ctlinfo/dpt_ctlinfo.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
+ * $DragonFly: src/usr.sbin/dpt/dpt_ctlinfo/dpt_ctlinfo.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* dpt_ctlinfo.c:  Dunp a DPT HBA Information Block */
@@ -60,8 +60,8 @@ main(int argc, char **argv, char **argp)
     int ndx;
     
     if ( (fd = open(argv[1], O_RDWR, S_IRUSR | S_IWUSR)) == -1 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
-                                         argv[0], argv[1], strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
+                       argv[0], argv[1], strerror(errno));
                exit(1);
     }
 
@@ -73,49 +73,49 @@ main(int argc, char **argv, char **argp)
     pass_thru.command_buffer = (u_int8_t *)&compat_softc;
 
     if ( (result = ioctl(fd, DPT_IOCTL_SEND, &pass_thru)) != 0 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to send IOCTL "
-                             "%lx - %s\n",
-                             argv[0], DPT_IOCTL_SEND,
-                             strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to send IOCTL "
+                       "%lx - %s\n",
+                       argv[0], DPT_IOCTL_SEND,
+                       strerror(errno));
                exit(1);
     }
 
-       (void)fprintf(stdout, "%x:", compat_softc.ha_state);
+       fprintf(stdout, "%x:", compat_softc.ha_state);
 
        for (ndx = 0; ndx < MAX_CHANNELS; ndx++)
-               (void)fprintf(stdout, (ndx == (MAX_CHANNELS - 1)) ? "%d:" :
-                             "%d,",
-                             compat_softc.ha_id[ndx]);
+               fprintf(stdout, (ndx == (MAX_CHANNELS - 1)) ? "%d:" :
+                       "%d,",
+                       compat_softc.ha_id[ndx]);
 
-       (void)fprintf(stdout, "%d:", compat_softc.ha_vect);
-       (void)fprintf(stdout, "%x:", compat_softc.ha_base);
-       (void)fprintf(stdout, "%d:", compat_softc.ha_max_jobs);
+       fprintf(stdout, "%d:", compat_softc.ha_vect);
+       fprintf(stdout, "%x:", compat_softc.ha_base);
+       fprintf(stdout, "%d:", compat_softc.ha_max_jobs);
 
        switch (compat_softc.ha_cache) {
        case DPT_NO_CACHE:
-               (void)fprintf(stdout, "No Cache:");
+               fprintf(stdout, "No Cache:");
                break;
        case DPT_CACHE_WRITETHROUGH:
-               (void)fprintf(stdout, "WriteThrough:");
+               fprintf(stdout, "WriteThrough:");
                break;
        case DPT_CACHE_WRITEBACK:
-               (void)fprintf(stdout, "WriteBack:");
+               fprintf(stdout, "WriteBack:");
                break;
        default:
-               (void)fprintf(stdout, "UnKnown (%d):", compat_softc.ha_cache);
+               fprintf(stdout, "UnKnown (%d):", compat_softc.ha_cache);
        }
 
-       (void)fprintf(stdout, "%d:", compat_softc.ha_cachesize);
-       (void)fprintf(stdout, "%d:", compat_softc.ha_nbus);
-       (void)fprintf(stdout, "%d:", compat_softc.ha_ntargets);
-       (void)fprintf(stdout, "%d:", compat_softc.ha_nluns);
-       (void)fprintf(stdout, "%d:", compat_softc.ha_tshift);
-       (void)fprintf(stdout, "%d:", compat_softc.ha_bshift);
+       fprintf(stdout, "%d:", compat_softc.ha_cachesize);
+       fprintf(stdout, "%d:", compat_softc.ha_nbus);
+       fprintf(stdout, "%d:", compat_softc.ha_ntargets);
+       fprintf(stdout, "%d:", compat_softc.ha_nluns);
+       fprintf(stdout, "%d:", compat_softc.ha_tshift);
+       fprintf(stdout, "%d:", compat_softc.ha_bshift);
 
-       (void)fprintf(stdout, "%d:", compat_softc.ha_npend);
-       (void)fprintf(stdout, "%d:", compat_softc.ha_active_jobs);
+       fprintf(stdout, "%d:", compat_softc.ha_npend);
+       fprintf(stdout, "%d:", compat_softc.ha_active_jobs);
 
-       (void)fprintf(stdout, "%s\n", compat_softc.ha_fw_version);
+       fprintf(stdout, "%s\n", compat_softc.ha_fw_version);
 
 
 
index 1769cbb..a238189 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/dpt/dpt_ctls/dpt_ctls.c,v 1.3 1999/08/28 01:16:06 peter Exp $
- * $DragonFly: src/usr.sbin/dpt/dpt_ctls/dpt_ctls.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
+ * $DragonFly: src/usr.sbin/dpt/dpt_ctls/dpt_ctls.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* dpt_ctls.c:  Dunp a the number of configured DPT HBAs */
@@ -56,8 +56,8 @@ main(int argc, char **argv, char **argp)
     int fd;
 
     if ( (fd = open(argv[1], O_RDWR, S_IRUSR | S_IWUSR)) == -1 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
-                                         argv[0], argv[1], strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
+                       argv[0], argv[1], strerror(errno));
                exit(1);
     }
 
@@ -69,13 +69,13 @@ main(int argc, char **argv, char **argp)
     pass_thru.command_buffer = (u_int8_t *)&controllers_present;
 
     if ( (result = ioctl(fd, DPT_IOCTL_SEND, &pass_thru)) != 0 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to send IOCTL "
-                             "%lx - %s\n",
-                             argv[0], DPT_IOCTL_SEND,
-                             strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to send IOCTL "
+                       "%lx - %s\n",
+                       argv[0], DPT_IOCTL_SEND,
+                       strerror(errno));
                exit(1);
     }
 
-       (void)fprintf(stdout, "%d\n", controllers_present);
+       fprintf(stdout, "%d\n", controllers_present);
     return(0);
 }
index de93b13..11d8b63 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/dpt/dpt_dm/dpt_dm.c,v 1.3 1999/08/28 01:16:07 peter Exp $
- * $DragonFly: src/usr.sbin/dpt/dpt_dm/dpt_dm.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
+ * $DragonFly: src/usr.sbin/dpt/dpt_dm/dpt_dm.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* dpt_dm.c: Dump a DPT metrics structure */
@@ -254,42 +254,42 @@ main(int argc, char **argv, char **argp)
     int ndx;
 
     if ( (fd = open(argv[1], O_RDWR, S_IRUSR | S_IWUSR)) == -1 ) {
-       (void)fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
-                     argv[0], argv[1], strerror(errno));
+       fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
+               argv[0], argv[1], strerror(errno));
        exit(1);
     }
 
     if ( (result = ioctl(fd, DPT_IOCTL_INTERNAL_METRICS, &metrics)) != 0 ) {
-       (void)fprintf(stderr, "%s ERROR:  Failed to send IOCTL %lx - %s\n",
-                     argv[0], DPT_IOCTL_INTERNAL_METRICS,
-                     strerror(errno));
+       fprintf(stderr, "%s ERROR:  Failed to send IOCTL %lx - %s\n",
+               argv[0], DPT_IOCTL_INTERNAL_METRICS,
+               strerror(errno));
        exit(2);
     }
 
     /* Interrupt related measurements */
-    (void)fprintf(stdout, "Interrupts:%u:%u:%s:%u\n\nCommands:\n",
-                 metrics.aborted_interrupts,
-                 metrics.spurious_interrupts,
-                 metrics.min_intr_time == BIG_ENOUGH ?
-                       "N/A" :
-                       tmpsprintf(0, "%u", metrics.min_intr_time),
-                 metrics.max_intr_time);
+    fprintf(stdout, "Interrupts:%u:%u:%s:%u\n\nCommands:\n",
+           metrics.aborted_interrupts,
+           metrics.spurious_interrupts,
+           metrics.min_intr_time == BIG_ENOUGH ?
+               "N/A" :
+               tmpsprintf(0, "%u", metrics.min_intr_time),
+           metrics.max_intr_time);
 
     /* SCSI Commands, can be no more than 256 of them */
     for (ndx = 0; ndx < 256; ndx++) {
        if (metrics.command_count[ndx] != 0) {
-           (void)fprintf(stdout, "%u:%s:%u:%s:%d\n",
-                         ndx,
-                         scsi_cmd_name((u_int8_t)ndx), 
-                         metrics.command_count[ndx],
-                         metrics.min_command_time[ndx] == BIG_ENOUGH ?
-                               "N/A" :
-                               tmpsprintf(0, "%u", metrics.min_command_time[ndx]),
-                         metrics.max_command_time[ndx]);
+           fprintf(stdout, "%u:%s:%u:%s:%d\n",
+                   ndx,
+                   scsi_cmd_name((u_int8_t)ndx), 
+                   metrics.command_count[ndx],
+                   metrics.min_command_time[ndx] == BIG_ENOUGH ?
+                       "N/A" :
+                       tmpsprintf(0, "%u", metrics.min_command_time[ndx]),
+                   metrics.max_command_time[ndx]);
        }
     }
     
-    (void)fprintf(stdout, "\nREAD by size:\n");
+    fprintf(stdout, "\nREAD by size:\n");
 
     /* READ/WRITE statistics, per block size */
 
@@ -332,14 +332,14 @@ main(int argc, char **argv, char **argp)
                block_size = "Gcc, shut up!";
            }
            
-           (void)fprintf(stdout, "%s:%u:%u:%u\n", block_size,
-                         metrics.read_by_size_count[ndx],
-                         metrics.read_by_size_min_time[ndx],
-                         metrics.read_by_size_max_time[ndx]);
+           fprintf(stdout, "%s:%u:%u:%u\n", block_size,
+                   metrics.read_by_size_count[ndx],
+                   metrics.read_by_size_min_time[ndx],
+                   metrics.read_by_size_max_time[ndx]);
        }
     }
            
-    (void)fprintf(stdout, "\nWRITE by size:\n");
+    fprintf(stdout, "\nWRITE by size:\n");
 
     for ( ndx = 0; ndx < 10; ndx++) {          
        if (metrics.write_by_size_count[ndx] != 0) {
@@ -380,38 +380,38 @@ main(int argc, char **argv, char **argp)
                block_size = "Gcc, shut up!";
            }
            
-           (void)fprintf(stdout, "%s:%u:%u:%u\n", block_size,
-                         metrics.write_by_size_count[ndx],
-                         metrics.write_by_size_min_time[ndx],
-                         metrics.write_by_size_max_time[ndx]);
+           fprintf(stdout, "%s:%u:%u:%u\n", block_size,
+                   metrics.write_by_size_count[ndx],
+                   metrics.write_by_size_min_time[ndx],
+                   metrics.write_by_size_max_time[ndx]);
        }
        
     }
     
-    (void)fprintf(stdout, "\nQueues:%u:%s:%u:%u:%s:%u:%u:%s:%u\n", 
-                 metrics.max_waiting_count,
-                 metrics.min_waiting_time == BIG_ENOUGH ?
-                       "N/A" :
-                       tmpsprintf(0, "%u", metrics.min_waiting_time),
-                 metrics.max_waiting_time,
-                 metrics.max_submit_count,
-                 metrics.min_submit_time == BIG_ENOUGH ?
-                       "N/A" :
-                       tmpsprintf(1, "%u", metrics.min_submit_time),
-                 metrics.max_submit_time,
-                 metrics.max_complete_count,
-                 metrics.min_complete_time == BIG_ENOUGH ?
-                       "N/A" :
-                       tmpsprintf(2, "%u", metrics.min_complete_time),
-                 metrics.max_complete_time);
+    fprintf(stdout, "\nQueues:%u:%s:%u:%u:%s:%u:%u:%s:%u\n", 
+           metrics.max_waiting_count,
+           metrics.min_waiting_time == BIG_ENOUGH ?
+               "N/A" :
+               tmpsprintf(0, "%u", metrics.min_waiting_time),
+           metrics.max_waiting_time,
+           metrics.max_submit_count,
+           metrics.min_submit_time == BIG_ENOUGH ?
+               "N/A" :
+               tmpsprintf(1, "%u", metrics.min_submit_time),
+           metrics.max_submit_time,
+           metrics.max_complete_count,
+           metrics.min_complete_time == BIG_ENOUGH ?
+               "N/A" :
+               tmpsprintf(2, "%u", metrics.min_complete_time),
+           metrics.max_complete_time);
 
-    (void)fprintf(stdout, "Hardware Ports:%u:%u:%u:%s\n",
-                 metrics.command_collisions,
-                 metrics.command_too_busy,
-                 metrics.max_eata_tries,
-                 metrics.min_eata_tries == BIG_ENOUGH ?
-                       "N/A" :
-                       tmpsprintf(0, "%u", metrics.min_eata_tries));
+    fprintf(stdout, "Hardware Ports:%u:%u:%u:%s\n",
+           metrics.command_collisions,
+           metrics.command_too_busy,
+           metrics.max_eata_tries,
+           metrics.min_eata_tries == BIG_ENOUGH ?
+               "N/A" :
+               tmpsprintf(0, "%u", metrics.min_eata_tries));
 
     return(0);
 }
index 360077e..646b4bc 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/dpt/dpt_led/dpt_led.c,v 1.3 1999/08/28 01:16:08 peter Exp $
- * $DragonFly: src/usr.sbin/dpt/dpt_led/dpt_led.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
+ * $DragonFly: src/usr.sbin/dpt/dpt_led/dpt_led.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* dpt_led.c:  Show the blinking LED array status of a DPT HBAs */
@@ -56,8 +56,8 @@ main(int argc, char **argv, char **argp)
     int fd;
 
     if ( (fd = open(argv[1], O_RDWR, S_IRUSR | S_IWUSR)) == -1 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
-                                         argv[0], argv[1], strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
+                       argv[0], argv[1], strerror(errno));
                exit(1);
     }
 
@@ -69,14 +69,14 @@ main(int argc, char **argv, char **argp)
     pass_thru.command_buffer = (u_int8_t *)&led;
 
     if ( (result = ioctl(fd, DPT_IOCTL_SEND, &pass_thru)) != 0 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to send IOCTL %lx "
-                             "- %s\n",
-                             argv[0], DPT_IOCTL_SEND,
-                             strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to send IOCTL %lx "
+                       "- %s\n",
+                       argv[0], DPT_IOCTL_SEND,
+                       strerror(errno));
                exit(1);
     }
 
-       (void)fprintf(stdout, "%s\n", i2bin((unsigned int)led, 16));
+       fprintf(stdout, "%s\n", i2bin((unsigned int)led, 16));
     return(0);
 }
 
index cd8db94..2e2f631 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/dpt/dpt_sig/dpt_sig.c,v 1.3 1999/08/28 01:16:09 peter Exp $
- * $DragonFly: src/usr.sbin/dpt/dpt_sig/dpt_sig.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
+ * $DragonFly: src/usr.sbin/dpt/dpt_sig/dpt_sig.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* dpt_sig.c:  Dunp a DPT Signature */
@@ -59,25 +59,25 @@ hex_dump(u_int8_t * data, int length, char *name, int no)
 {
     int        line, column, ndx;
        
-    (void)fprintf(stdout, "Kernel Hex Dump for %s-%d at %p (%d bytes)\n",
-                                 name, no, data, length);
+    fprintf(stdout, "Kernel Hex Dump for %s-%d at %p (%d bytes)\n",
+           name, no, data, length);
        
     /* Zero out all the counters and repeat for as many bytes as we have */
     for (ndx = 0, column = 0, line = 0; ndx < length; ndx++) {
                /* Print relative offset at the beginning of every line */
                if (column == 0)
-                       (void)fprintf(stdout, "%04x ", ndx);
+                       fprintf(stdout, "%04x ", ndx);
        
                /* Print the byte as two hex digits, followed by a space */
-               (void)fprintf(stdout, "%02x ", data[ndx]);
+               fprintf(stdout, "%02x ", data[ndx]);
        
                /* Split the row of 16 bytes in half */
                if (++column == 8) {
-                       (void)fprintf(stdout, " ");
+                       fprintf(stdout, " ");
                }
                /* St the end of each row of 16 bytes, put a space ... */
                if (column == 16) {
-                       (void)fprintf(stdout, " ");
+                       fprintf(stdout, "       ");
                
                        /* ... and then print the ASCII-visible on a line. */
                        for (column = 0; column < 16; column++) {
@@ -88,13 +88,13 @@ hex_dump(u_int8_t * data, int length, char *name, int no)
                                 * dot. ;-(
                                 */
                                if (IsGraph(data[ascii_pos]))
-                                       (void)fprintf(stdout, "%c", data[ascii_pos]);
+                                       fprintf(stdout, "%c", data[ascii_pos]);
                                else
-                                       (void)fprintf(stdout, ".");
+                                       fprintf(stdout, ".");
                        }
                
                        /* Each line ends with a new line */
-                       (void)fprintf(stdout, "\n");
+                       fprintf(stdout, "\n");
                        column = 0;
                
                        /*
@@ -104,7 +104,7 @@ hex_dump(u_int8_t * data, int length, char *name, int no)
                         * page was 256 bytes :-)
                         */
                        if (++line > 15) {
-                               (void)fprintf(stdout, "\n");
+                               fprintf(stdout, "\n");
                                line = 0;
                        }
                }
@@ -122,27 +122,27 @@ hex_dump(u_int8_t * data, int length, char *name, int no)
                 * ``missing'' ...
                 */
                for (skip = 0; skip < spaces; skip++)
-                       (void)fprintf(stdout, " ");
+                       fprintf(stdout, " ");
        
                /* ... And the gap separating the hex dump from the ASCII */
-               (void)fprintf(stdout, "  ");
+               fprintf(stdout, "  ");
        
                /*
                 * Do not forget the extra space that splits the hex dump
                 * vertically
                 */
                if (column < 8)
-           (void)fprintf(stdout, " ");
+           fprintf(stdout, " ");
        
                for (column = 0; column < (16 - modulus); column++) {
                        int     ascii_pos = ndx - (16 - modulus) + column;
                
                        if (IsGraph(data[ascii_pos]))
-                               (void)fprintf(stdout, "%c", data[ascii_pos]);
+                               fprintf(stdout, "%c", data[ascii_pos]);
                        else
-                               (void)fprintf(stdout, ".");
+                               fprintf(stdout, ".");
                }
-               (void)fprintf(stdout, "\n");
+               fprintf(stdout, "\n");
     }
 }
 
@@ -164,9 +164,9 @@ main(int argc, char **argv, char **argp)
     sp2 = "Unknown";
     
     if ( (fd = open(argv[1], O_RDWR, S_IRUSR | S_IWUSR)) == -1 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to open \"%s\" "
-                             "- %s\n",
-                             argv[0], argv[1], strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to open \"%s\" "
+                       "- %s\n",
+                       argv[0], argv[1], strerror(errno));
                exit(1);
     }
 
@@ -178,18 +178,18 @@ main(int argc, char **argv, char **argp)
     pass_thru.command_buffer = (u_int8_t *)&signature;
 
     if ( (result = ioctl(fd, DPT_IOCTL_SEND, &pass_thru)) != 0 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to send IOCTL "
-                             "%lx - %s\n",
-                             argv[0], DPT_IOCTL_SEND,
-                             strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to send IOCTL "
+                       "%lx - %s\n",
+                       argv[0], DPT_IOCTL_SEND,
+                       strerror(errno));
                exit(1);
     }
 
     /* dsSignature is not null terminated! */
     for (ndx = 0; ndx < sizeof(signature.dsSignature); ndx++)
-               (void)fputc(signature.dsSignature[ndx], stdout);
+               fputc(signature.dsSignature[ndx], stdout);
     
-    (void)fprintf(stdout, ":%x:", signature.SigVersion);
+    fprintf(stdout, ":%x:", signature.SigVersion);
 
     switch (signature.ProcessorFamily) {
     case PROC_INTEL:
@@ -249,7 +249,7 @@ main(int argc, char **argv, char **argp)
                break;
     }
     
-    (void)fprintf(stdout, "%s:%s:", sp1, sp2);
+    fprintf(stdout, "%s:%s:", sp1, sp2);
 
     switch ( signature.Filetype ) {
     case FT_EXECUTABLE:
@@ -338,7 +338,7 @@ main(int argc, char **argv, char **argp)
                break;
     }
     
-    (void)fprintf(stdout, "%s:%s:", sp1, sp2);
+    fprintf(stdout, "%s:%s:", sp1, sp2);
 
     switch ( signature.OEM ) {
     case OEM_DPT:
@@ -433,166 +433,166 @@ main(int argc, char **argv, char **argp)
                break;
     }
     
-    (void)fprintf(stdout, "%s:%s:\n", sp1, sp2);
+    fprintf(stdout, "%s:%s:\n", sp1, sp2);
 
     if ( signature.Capabilities & CAP_RAID0 )
-               (void)fprintf(stdout, "RAID-0:");
+               fprintf(stdout, "RAID-0:");
     
     if ( signature.Capabilities & CAP_RAID1 )
-               (void)fprintf(stdout, "RAID-1:");
+               fprintf(stdout, "RAID-1:");
     
     if ( signature.Capabilities & CAP_RAID3 )
-               (void)fprintf(stdout, "RAID-3:");
+               fprintf(stdout, "RAID-3:");
     
     if ( signature.Capabilities & CAP_RAID5 )
-               (void)fprintf(stdout, "RAID-5:");
+               fprintf(stdout, "RAID-5:");
     
     if ( signature.Capabilities & CAP_SPAN )
-               (void)fprintf(stdout, "SPAN:");
+               fprintf(stdout, "SPAN:");
     
     if ( signature.Capabilities & CAP_PASS )
-               (void)fprintf(stdout, "PASS:");
+               fprintf(stdout, "PASS:");
     
     if ( signature.Capabilities & CAP_OVERLAP )
-               (void)fprintf(stdout, "OVERLAP:");
+               fprintf(stdout, "OVERLAP:");
     
     if ( signature.Capabilities & CAP_ASPI )
-               (void)fprintf(stdout, "ASPI:");
+               fprintf(stdout, "ASPI:");
     
     if ( signature.Capabilities & CAP_ABOVE16MB )
-               (void)fprintf(stdout, "ISA16MB:");
+               fprintf(stdout, "ISA16MB:");
     
     if ( signature.Capabilities & CAP_EXTEND )
-               (void)fprintf(stdout, "ISA16MB:");
+               fprintf(stdout, "ISA16MB:");
 
-    (void)fprintf(stdout, "\n");
+    fprintf(stdout, "\n");
 
     if ( signature.DeviceSupp & DEV_DASD )
-               (void)fprintf(stdout, "DASD:");
+               fprintf(stdout, "DASD:");
 
     if ( signature.DeviceSupp & DEV_TAPE )
-               (void)fprintf(stdout, "Tape:");
+               fprintf(stdout, "Tape:");
 
     if ( signature.DeviceSupp & DEV_PRINTER )
-               (void)fprintf(stdout, "Printer:");
+               fprintf(stdout, "Printer:");
 
     if ( signature.DeviceSupp & DEV_PROC )
-               (void)fprintf(stdout, "CPU:");
+               fprintf(stdout, "CPU:");
 
     if ( signature.DeviceSupp & DEV_WORM )
-               (void)fprintf(stdout, "WORM:");
+               fprintf(stdout, "WORM:");
 
     if ( signature.DeviceSupp & DEV_CDROM )
-               (void)fprintf(stdout, "CDROM:");
+               fprintf(stdout, "CDROM:");
 
     if ( signature.DeviceSupp & DEV_SCANNER )
-               (void)fprintf(stdout, "Scanner:");
+               fprintf(stdout, "Scanner:");
 
     if ( signature.DeviceSupp & DEV_OPTICAL )
-               (void)fprintf(stdout, "Optical:");
+               fprintf(stdout, "Optical:");
 
     if ( signature.DeviceSupp & DEV_JUKEBOX )
-               (void)fprintf(stdout, "Jukebox:");
+               fprintf(stdout, "Jukebox:");
 
     if ( signature.DeviceSupp & DEV_COMM )
-               (void)fprintf(stdout, "Comm:");
+               fprintf(stdout, "Comm:");
 
     if ( signature.DeviceSupp & DEV_OTHER )
-               (void)fprintf(stdout, "Other:");
+               fprintf(stdout, "Other:");
 
     if ( signature.DeviceSupp & DEV_ALL )
-               (void)fprintf(stdout, "All:");
+               fprintf(stdout, "All:");
 
-    (void)fprintf(stdout, "\n");
+    fprintf(stdout, "\n");
 
     if ( signature.AdapterSupp & ADF_2001 )
-               (void)fprintf(stdout, "PM2001:");
+               fprintf(stdout, "PM2001:");
 
     if ( signature.AdapterSupp & ADF_2012A )
-               (void)fprintf(stdout, "PM2012A:");
+               fprintf(stdout, "PM2012A:");
 
     if ( signature.AdapterSupp & ADF_PLUS_ISA )
-               (void)fprintf(stdout, "PM2011+PM2021:");
+               fprintf(stdout, "PM2011+PM2021:");
 
     if ( signature.AdapterSupp & ADF_PLUS_EISA )
-               (void)fprintf(stdout, "PM2012B+PM2022:");
+               fprintf(stdout, "PM2012B+PM2022:");
 
     if ( signature.AdapterSupp & ADF_SC3_ISA )
-               (void)fprintf(stdout, "PM2021:");
+               fprintf(stdout, "PM2021:");
 
     if ( signature.AdapterSupp & ADF_SC3_EISA )
-               (void)fprintf(stdout, "PM2022+PM2122:");
+               fprintf(stdout, "PM2022+PM2122:");
 
     if ( signature.AdapterSupp & ADF_SC3_PCI )
-               (void)fprintf(stdout, "SmartCache III PCI:");
+               fprintf(stdout, "SmartCache III PCI:");
 
     if ( signature.AdapterSupp & ADF_SC4_ISA )
-               (void)fprintf(stdout, "SmartCache IV ISA:");
+               fprintf(stdout, "SmartCache IV ISA:");
 
     if ( signature.AdapterSupp & ADF_SC4_EISA )
-               (void)fprintf(stdout, "SmartCache IV EISA:");
+               fprintf(stdout, "SmartCache IV EISA:");
 
     if ( signature.AdapterSupp & ADF_SC4_PCI )
-               (void)fprintf(stdout, "SmartCache IV PCI:");
+               fprintf(stdout, "SmartCache IV PCI:");
 
     if ( signature.AdapterSupp & ADF_ALL_MASTER )
-               (void)fprintf(stdout, "All Bus Mastering:");
+               fprintf(stdout, "All Bus Mastering:");
 
     if ( signature.AdapterSupp & ADF_ALL_CACHE )
-               (void)fprintf(stdout, "All Caching:");
+               fprintf(stdout, "All Caching:");
 
     if ( signature.AdapterSupp & ADF_ALL )
-               (void)fprintf(stdout, "All HBAs:");
+               fprintf(stdout, "All HBAs:");
     
-    (void)fprintf(stdout, "\n");
+    fprintf(stdout, "\n");
 
     if ( signature.Application & APP_DPTMGR )
-               (void)fprintf(stdout, "DPTMGR:");
+               fprintf(stdout, "DPTMGR:");
     
     if ( signature.Application & APP_ENGINE )
-               (void)fprintf(stdout, "Engine:");
+               fprintf(stdout, "Engine:");
     
     if ( signature.Application & APP_SYTOS )
-               (void)fprintf(stdout, "Systron Sytos Plus:");
+               fprintf(stdout, "Systron Sytos Plus:");
     
     if ( signature.Application & APP_CHEYENNE )
-               (void)fprintf(stdout, "Cheyenne ARCServe + ARCSolo:");
+               fprintf(stdout, "Cheyenne ARCServe + ARCSolo:");
     
     if ( signature.Application & APP_MSCDEX )
-               (void)fprintf(stdout, "Microsoft CD-ROM extensions:");
+               fprintf(stdout, "Microsoft CD-ROM extensions:");
     
     if ( signature.Application & APP_NOVABACK )
-               (void)fprintf(stdout, "NovaStor Novaback:");
+               fprintf(stdout, "NovaStor Novaback:");
     
     if ( signature.Application & APP_AIM )
-               (void)fprintf(stdout, "Archive Information Manager:");
+               fprintf(stdout, "Archive Information Manager:");
     
-    (void)fprintf(stdout, "\n");
+    fprintf(stdout, "\n");
 
     if ( signature.Requirements & REQ_SMARTROM )
-               (void)fprintf(stdout, "SmartROM:");
+               fprintf(stdout, "SmartROM:");
     
     if ( signature.Requirements & REQ_DPTDDL )
-               (void)fprintf(stdout, "DPTDDL.SYS:");
+               fprintf(stdout, "DPTDDL.SYS:");
     
     if ( signature.Requirements & REQ_HBA_DRIVER )
-               (void)fprintf(stdout, "HBA Driver:");
+               fprintf(stdout, "HBA Driver:");
     
     if ( signature.Requirements & REQ_ASPI_TRAN )
-               (void)fprintf(stdout, "ASPI Transport Modules:");
+               fprintf(stdout, "ASPI Transport Modules:");
     
     if ( signature.Requirements & REQ_ENGINE )
-               (void)fprintf(stdout, "DPT Engine:");
+               fprintf(stdout, "DPT Engine:");
     
     if ( signature.Requirements & REQ_COMM_ENG )
-               (void)fprintf(stdout, "DPT Comm Engine:");
+               fprintf(stdout, "DPT Comm Engine:");
     
-    (void)fprintf(stdout, "\n");
+    fprintf(stdout, "\n");
     
-    (void)fprintf(stdout, "%x.%x.%x:%d.%d.%d\n",
-                                 signature.Version, signature.Revision,
-                                 signature.SubRevision,
-                                 signature.Month, signature.Day, signature.Year + 1980);
+    fprintf(stdout, "%x.%x.%x:%d.%d.%d\n",
+           signature.Version, signature.Revision,
+           signature.SubRevision,
+           signature.Month, signature.Day, signature.Year + 1980);
     
     return(0);
 }
index 02a0028..0f3e222 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/dpt/dpt_softc/dpt_softc.c,v 1.3.2.1 2001/07/24 09:49:45 dd Exp $
- * $DragonFly: src/usr.sbin/dpt/dpt_softc/dpt_softc.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
+ * $DragonFly: src/usr.sbin/dpt/dpt_softc/dpt_softc.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* dpt_softc.c:  Dunp a DPT control structure */
@@ -101,87 +101,87 @@ main(int argc, char **argv, char **argp)
     int fd;
 
     if ( (fd = open(argv[1], O_RDWR, S_IRUSR | S_IWUSR)) == -1 ) {
-       (void)fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
-                     argv[0], argv[1], strerror(errno));
+       fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
+               argv[0], argv[1], strerror(errno));
        exit(1);
     }
 
     if ( (result = ioctl(fd, DPT_IOCTL_SOFTC, &udpt)) != 0 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to send IOCTL %lx - %s\n",
-                                         argv[0], DPT_IOCTL_SOFTC,
-                                         strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to send IOCTL %lx - %s\n",
+                       argv[0], DPT_IOCTL_SOFTC,
+                       strerror(errno));
                exit(2);
     }
 
-    (void)fprintf(stdout, "Counters:%d:%d:%d:%d:%d:%d:%d\n",
-                 udpt.total_ccbs_count,
-                 udpt.free_ccbs_count,
-                 udpt.waiting_ccbs_count,
-                 udpt.submitted_ccbs_count,
-                 udpt.completed_ccbs_count,
-                 udpt.commands_processed,
-                 udpt.lost_interrupts);
+    printf(stdout, "Counters:%d:%d:%d:%d:%d:%d:%d\n",
+          udpt.total_ccbs_count,
+          udpt.free_ccbs_count,
+          udpt.waiting_ccbs_count,
+          udpt.submitted_ccbs_count,
+          udpt.completed_ccbs_count,
+          udpt.commands_processed,
+          udpt.lost_interrupts);
 
-    (void)fprintf(stdout, "Queue Status:%s\n",
-                 i2bin(udpt.queue_status, sizeof(udpt.queue_status) * 8));
+    fprintf(stdout, "Queue Status:%s\n",
+           i2bin(udpt.queue_status, sizeof(udpt.queue_status) * 8));
     
-    (void)fprintf(stdout, "Free lock:%s\n",
-                 i2bin(udpt.free_lock, sizeof(udpt.free_lock) * 8));
+    fprintf(stdout, "Free lock:%s\n",
+           i2bin(udpt.free_lock, sizeof(udpt.free_lock) * 8));
     
-    (void)fprintf(stdout, "Waiting lock:%s\n",
-                 i2bin(udpt.waiting_lock, sizeof(udpt.waiting_lock) * 8));
+    fprintf(stdout, "Waiting lock:%s\n",
+           i2bin(udpt.waiting_lock, sizeof(udpt.waiting_lock) * 8));
     
-    (void)fprintf(stdout, "Submitted lock:%s\n",
-                 i2bin(udpt.submitted_lock, sizeof(udpt.submitted_lock) * 8));
+    fprintf(stdout, "Submitted lock:%s\n",
+           i2bin(udpt.submitted_lock, sizeof(udpt.submitted_lock) * 8));
     
-    (void)fprintf(stdout, "Completed lock:%s\n",
-                 i2bin(udpt.completed_lock, sizeof(udpt.completed_lock) * 8));
+    fprintf(stdout, "Completed lock:%s\n",
+           i2bin(udpt.completed_lock, sizeof(udpt.completed_lock) * 8));
     
-    (void)fprintf(stdout, "Configuration:%s:%d:%d:%d:%x:%d:%d\n",
-                 udpt.handle_interrupts ? "Yes" : "No",
-                 udpt.max_id,
-                 udpt.max_lun,
-                 udpt.channels,
-                 udpt.io_base,
-                 udpt.irq,
-                 udpt.dma_channel);
+    fprintf(stdout, "Configuration:%s:%d:%d:%d:%x:%d:%d\n",
+           udpt.handle_interrupts ? "Yes" : "No",
+           udpt.max_id,
+           udpt.max_lun,
+           udpt.channels,
+           udpt.io_base,
+           udpt.irq,
+           udpt.dma_channel);
     
-    (void)fprintf(stdout, "ID:%x:%x:%s:%s:%s:%s:%x\n",
-                 udpt.board_data.deviceType,
-                 udpt.board_data.rm_dtq,
-                 udpt.board_data.vendor,
-                 udpt.board_data.modelNum,
-                 udpt.board_data.firmware,
-                 udpt.board_data.protocol,
-                 udpt.EATA_revision);
+    fprintf(stdout, "ID:%x:%x:%s:%s:%s:%s:%x\n",
+           udpt.board_data.deviceType,
+           udpt.board_data.rm_dtq,
+           udpt.board_data.vendor,
+           udpt.board_data.modelNum,
+           udpt.board_data.firmware,
+           udpt.board_data.protocol,
+           udpt.EATA_revision);
 
-    (void)fprintf(stdout,"Capabilities:%x:%d:%s:%s:%s:%s:%s\n",
-                 udpt.bustype,
-                 udpt.channels,
-                 i2bin((u_int32_t)udpt.state, sizeof(udpt.state) * 8),
-                 udpt.primary ? "Yes" : "No",
-                 udpt.more_support ? "Yes" : "No",
-                 udpt.immediate_support ? "Yes" : "No",
-                 udpt.broken_INQUIRY ? "Yes" : "No");
+    fprintf(stdout,"Capabilities:%x:%d:%s:%s:%s:%s:%s\n",
+           udpt.bustype,
+           udpt.channels,
+           i2bin((u_int32_t)udpt.state, sizeof(udpt.state) * 8),
+           udpt.primary ? "Yes" : "No",
+           udpt.more_support ? "Yes" : "No",
+           udpt.immediate_support ? "Yes" : "No",
+           udpt.broken_INQUIRY ? "Yes" : "No");
 
-    (void)fprintf(stdout,"More Config:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d\n",
-                 udpt.resetlevel[0],
-                 udpt.resetlevel[1],
-                 udpt.resetlevel[2],
-                 udpt.cplen,           
-                 udpt.cppadlen,
-                 udpt.queuesize,
-                 udpt.sgsize,
-                 udpt.hostid[0],
-                 udpt.hostid[1],
-                 udpt.hostid[2]);
+    fprintf(stdout,"More Config:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d\n",
+           udpt.resetlevel[0],
+           udpt.resetlevel[1],
+           udpt.resetlevel[2],
+           udpt.cplen,         
+           udpt.cppadlen,
+           udpt.queuesize,
+           udpt.sgsize,
+           udpt.hostid[0],
+           udpt.hostid[1],
+           udpt.hostid[2]);
 
-    (void)fprintf(stdout,"Cache:%s:%d\n",
-                 (udpt.cache_type == DPT_NO_CACHE)
-                 ? "None"
-                 : (udpt.cache_type == DPT_CACHE_WRITETHROUGH)
-                 ? "Write-Through" : "Write-Back",
-                 udpt.cache_size);
+    fprintf(stdout,"Cache:%s:%d\n",
+           (udpt.cache_type == DPT_NO_CACHE)
+           ? "None"
+           : (udpt.cache_type == DPT_CACHE_WRITETHROUGH)
+           ? "Write-Through" : "Write-Back",
+           udpt.cache_size);
 
     return(0);
 }
index 01c7f93..e0e5ad2 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/dpt/dpt_sysinfo/dpt_sysinfo.c,v 1.3 1999/08/28 01:16:10 peter Exp $
- * $DragonFly: src/usr.sbin/dpt/dpt_sysinfo/dpt_sysinfo.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
+ * $DragonFly: src/usr.sbin/dpt/dpt_sysinfo/dpt_sysinfo.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 /* dpt_ctlinfo.c:  Dunp a DPT HBA Information Block */
@@ -60,8 +60,8 @@ main(int argc, char **argv, char **argp)
     int ndx;
     
     if ( (fd = open(argv[1], O_RDWR, S_IRUSR | S_IWUSR)) == -1 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
-                                         argv[0], argv[1], strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to open \"%s\" - %s\n",
+                       argv[0], argv[1], strerror(errno));
                exit(1);
     }
 
@@ -73,184 +73,184 @@ main(int argc, char **argv, char **argp)
     pass_thru.command_buffer = (u_int8_t *)&sysinfo;
 
     if ( (result = ioctl(fd, DPT_IOCTL_SEND, &pass_thru)) != 0 ) {
-               (void)fprintf(stderr, "%s ERROR:  Failed to send IOCTL %lx - %s\n",
-                                         argv[0], DPT_IOCTL_SEND,
-                                         strerror(errno));
+               fprintf(stderr, "%s ERROR:  Failed to send IOCTL %lx - %s\n",
+                       argv[0], DPT_IOCTL_SEND,
+                       strerror(errno));
                exit(1);
     }
 
-       (void)fprintf(stdout, "%x:%x:%d:",
-                                 sysinfo.drive0CMOS, sysinfo.drive1CMOS, sysinfo.numDrives);
+       fprintf(stdout, "%x:%x:%d:",
+               sysinfo.drive0CMOS, sysinfo.drive1CMOS, sysinfo.numDrives);
 
        switch (sysinfo.processorFamily) {
        case PROC_INTEL:
-               (void)fprintf(stdout, "Intel:");
+               fprintf(stdout, "Intel:");
                switch (sysinfo.processorType) {
                case PROC_8086:
-                       (void)fprintf(stdout, "8086:");
+                       fprintf(stdout, "8086:");
                        break;
                case PROC_286:
-                       (void)fprintf(stdout, "80286:");
+                       fprintf(stdout, "80286:");
                        break;
                case PROC_386:
-                       (void)fprintf(stdout, "i386:");
+                       fprintf(stdout, "i386:");
                        break;
                case PROC_486:
-                       (void)fprintf(stdout, "80486:");
+                       fprintf(stdout, "80486:");
                        break;
                case PROC_PENTIUM:
-                       (void)fprintf(stdout, "Pentium:");
+                       fprintf(stdout, "Pentium:");
                        break;
                case PROC_P6:
-                       (void)fprintf(stdout, "Pentium-Pro:");
+                       fprintf(stdout, "Pentium-Pro:");
                        break;
                default:
-                       (void)fprintf(stdout, "Unknown (%d):", sysinfo.processorType);
+                       fprintf(stdout, "Unknown (%d):", sysinfo.processorType);
                }
                break;
        case PROC_MOTOROLA:
-               (void)fprintf(stdout, "Motorola:");
+               fprintf(stdout, "Motorola:");
                switch (sysinfo.processorType) {
                case PROC_68000:
-                       (void)fprintf(stdout, "M68000");
+                       fprintf(stdout, "M68000");
                        break;
                case PROC_68020:
-                       (void)fprintf(stdout, "M68020");
+                       fprintf(stdout, "M68020");
                        break;
                case PROC_68030:
-                       (void)fprintf(stdout, "M68030");
+                       fprintf(stdout, "M68030");
                        break;
                case PROC_68040:
-                       (void)fprintf(stdout, "M68040");
+                       fprintf(stdout, "M68040");
                        break;
                default:
-                       (void)fprintf(stdout, "Unknown (%d):", sysinfo.processorType);
+                       fprintf(stdout, "Unknown (%d):", sysinfo.processorType);
                }
                break;
        case PROC_MIPS4000:
-               (void)fprintf(stdout, "MIPS:Any:");
+               fprintf(stdout, "MIPS:Any:");
                break;
        case PROC_ALPHA:
-               (void)fprintf(stdout, "Alpha:Any:");
+               fprintf(stdout, "Alpha:Any:");
                break;
        default:
-               (void)fprintf(stdout, "Unknown (%d):Any:", sysinfo.processorFamily);
+               fprintf(stdout, "Unknown (%d):Any:", sysinfo.processorFamily);
        }
 
-       (void)fprintf(stdout, "%d.%d.%d:",
-                                 sysinfo.smartROMMajorVersion,
-                                 sysinfo.smartROMMinorVersion,
-                                 sysinfo.smartROMRevision);
+       fprintf(stdout, "%d.%d.%d:",
+               sysinfo.smartROMMajorVersion,
+               sysinfo.smartROMMinorVersion,
+               sysinfo.smartROMRevision);
 
-       (void)fprintf(stdout, "%c%c%c%c%c%c%c%c%c%c%c:",
-                                 (sysinfo.flags & SI_CMOS_Valid)               ? '+' : '-',
-                                 (sysinfo.flags & SI_NumDrivesValid)   ? '+' : '-',
-                                 (sysinfo.flags & SI_ProcessorValid)   ? '+' : '-',
-                                 (sysinfo.flags & SI_MemorySizeValid)  ? '+' : '-',
-                                 (sysinfo.flags & SI_DriveParamsValid) ? '+' : '-',
-                                 (sysinfo.flags & SI_SmartROMverValid) ? '+' : '-',
-                                 (sysinfo.flags & SI_OSversionValid)   ? '+' : '-',
-                                 (sysinfo.flags & SI_OSspecificValid)  ? '+' : '-',
-                                 (sysinfo.flags & SI_BusTypeValid)             ? '+' : '-',
-                                 (sysinfo.flags & SI_ALL_VALID)                ? '+' : '-',
-                                 (sysinfo.flags & SI_NO_SmartROM)      ? '+' : '-');
+       fprintf(stdout, "%c%c%c%c%c%c%c%c%c%c%c:",
+               (sysinfo.flags & SI_CMOS_Valid)         ? '+' : '-',
+               (sysinfo.flags & SI_NumDrivesValid)     ? '+' : '-',
+               (sysinfo.flags & SI_ProcessorValid)     ? '+' : '-',
+               (sysinfo.flags & SI_MemorySizeValid)    ? '+' : '-',
+               (sysinfo.flags & SI_DriveParamsValid)   ? '+' : '-',
+               (sysinfo.flags & SI_SmartROMverValid)   ? '+' : '-',
+               (sysinfo.flags & SI_OSversionValid)     ? '+' : '-',
+               (sysinfo.flags & SI_OSspecificValid)    ? '+' : '-',
+               (sysinfo.flags & SI_BusTypeValid)               ? '+' : '-',
+               (sysinfo.flags & SI_ALL_VALID)                  ? '+' : '-',
+               (sysinfo.flags & SI_NO_SmartROM)        ? '+' : '-');
 
-       (void)fprintf(stdout, "%d:", sysinfo.conventionalMemSize);
-       (void)fprintf(stdout, "%d:", sysinfo.extendedMemSize);
+       fprintf(stdout, "%d:", sysinfo.conventionalMemSize);
+       fprintf(stdout, "%d:", sysinfo.extendedMemSize);
 
        switch (sysinfo.osType) {
        case OS_DOS:
-               (void)fprintf(stdout, "DOS:");
+               fprintf(stdout, "DOS:");
                break;
        case OS_WINDOWS:
-               (void)fprintf(stdout, "Win3.1:");
+               fprintf(stdout, "Win3.1:");
                break;
        case OS_WINDOWS_NT:
-               (void)fprintf(stdout, "NT:");
+               fprintf(stdout, "NT:");
                break;
        case OS_OS2M:
-               (void)fprintf(stdout, "OS/2-std:");
+               fprintf(stdout, "OS/2-std:");
                break;
        case OS_OS2L:
-               (void)fprintf(stdout, "OS/2-LADDR:");
+               fprintf(stdout, "OS/2-LADDR:");
                break;
        case OS_OS22x:
-               (void)fprintf(stdout, "OS/2-2.x:");
+               fprintf(stdout, "OS/2-2.x:");
                break;
        case OS_NW286:
-               (void)fprintf(stdout, "NetWare-286:");
+               fprintf(stdout, "NetWare-286:");
                break;
        case OS_NW386:
-               (void)fprintf(stdout, "NetWare-386:");
+               fprintf(stdout, "NetWare-386:");
                break;
        case OS_GEN_UNIX:
-               (void)fprintf(stdout, "Unix:");
+               fprintf(stdout, "Unix:");
                break;
        case OS_SCO_UNIX:
-               (void)fprintf(stdout, "SCO Unix:");
+               fprintf(stdout, "SCO Unix:");
                break;
        case OS_ATT_UNIX:
-               (void)fprintf(stdout, "AT&T Unix:");
+               fprintf(stdout, "AT&T Unix:");
                break;
        case OS_UNIXWARE:
-               (void)fprintf(stdout, "UnixWare:");
+               fprintf(stdout, "UnixWare:");
                break;
        case OS_INT_UNIX:
-               (void)fprintf(stdout, "IAC Unix:");
+               fprintf(stdout, "IAC Unix:");
                break;
        case OS_SOLARIS:
-               (void)fprintf(stdout, "Solaris:");
+               fprintf(stdout, "Solaris:");
                break;
        case OS_QNX:
-               (void)fprintf(stdout, "Qnx:");
+               fprintf(stdout, "Qnx:");
                break;
        case OS_NEXTSTEP:
-               (void)fprintf(stdout, "NextStep:");
+               fprintf(stdout, "NextStep:");
                break;
        case OS_BANYAN:
-               (void)fprintf(stdout, "Banyan:");
+               fprintf(stdout, "Banyan:");
                break;
        case OS_OLIVETTI_UNIX:
-               (void)fprintf(stdout, "Olivetti Unix:");
+               fprintf(stdout, "Olivetti Unix:");
                break;
        case OS_FREEBSD:
-               (void)fprintf(stdout, "FreeBSD:");
+               fprintf(stdout, "FreeBSD:");
                break;
        case OS_OTHER:
-               (void)fprintf(stdout, "Other (%d):", sysinfo.osType);
+               fprintf(stdout, "Other (%d):", sysinfo.osType);
                break;
        default:
-               (void)fprintf(stdout, "Unknown (%d):", sysinfo.osType);
+               fprintf(stdout, "Unknown (%d):", sysinfo.osType);
        }
 
-       (void)fprintf(stdout, "%d.%d.%d.%d:", sysinfo.osMajorVersion,
-                                 sysinfo.osMinorVersion, sysinfo.osRevision,
-                                 sysinfo.osSubRevision);
+       fprintf(stdout, "%d.%d.%d.%d:", sysinfo.osMajorVersion,
+               sysinfo.osMinorVersion, sysinfo.osRevision,
+               sysinfo.osSubRevision);
 
        switch (sysinfo.busType) {
        case HBA_BUS_ISA:
-               (void)fprintf(stdout, "ISA:");
+               fprintf(stdout, "ISA:");
                break;
        case HBA_BUS_EISA:
-               (void)fprintf(stdout, "EISA:");
+               fprintf(stdout, "EISA:");
                break;
        case HBA_BUS_PCI:
-               (void)fprintf(stdout, "PCI:");
+               fprintf(stdout, "PCI:");
                break;
        default:
-               (void)fprintf(stdout, "Unknown (%d):", sysinfo.busType);
+               fprintf(stdout, "Unknown (%d):", sysinfo.busType);
        }
 
        for (ndx = 0; ndx < 16; ndx++) {
                if (sysinfo.drives[ndx].cylinders == 0)
                        continue;
-               (void)fprintf(stdout, "d%dc%dh%ds%d:", ndx,
-                                         sysinfo.drives[ndx].cylinders,
-                                         sysinfo.drives[ndx].heads,
-                                         sysinfo.drives[ndx].sectors);
+               fprintf(stdout, "d%dc%dh%ds%d:", ndx,
+                       sysinfo.drives[ndx].cylinders,
+                       sysinfo.drives[ndx].heads,
+                       sysinfo.drives[ndx].sectors);
        }
 
-       (void)fprintf(stdout, "\n");
+       fprintf(stdout, "\n");
 
     return(0);
 }
index aa64651..370add4 100644 (file)
@@ -30,7 +30,7 @@
  *     $Id: log.c,v 1.25 2000/10/09 12:53:29 hm Exp $ 
  *
  * $FreeBSD: src/usr.sbin/i4b/isdnd/log.c,v 1.6.2.2 2001/08/01 17:45:03 obrien Exp $
- * $DragonFly: src/usr.sbin/i4b/isdnd/log.c,v 1.5 2004/03/26 00:30:12 cpressey Exp $
+ * $DragonFly: src/usr.sbin/i4b/isdnd/log.c,v 1.6 2004/12/18 22:48:03 swildner Exp $
  *
  *      last edit-date: [Mon Dec 13 21:47:28 1999]
  *
@@ -89,13 +89,12 @@ init_log(void)
        {
 #if DEBUG
                if(do_debug && do_fork == 0 && do_fullscreen == 0)
-                       (void)openlog("isdnd",
+                       openlog("isdnd",
                                LOG_PID|LOG_CONS|LOG_NDELAY|LOG_PERROR,
                                logfacility);
                else
 #endif
-               (void)openlog("isdnd", LOG_PID|LOG_CONS|LOG_NDELAY,
-                               logfacility);
+               openlog("isdnd", LOG_PID|LOG_CONS|LOG_NDELAY, logfacility);
        }
 
        /* initialize the regexp array */
@@ -134,7 +133,7 @@ finish_log(void)
        }
        else
        {
-               (void)closelog();
+               closelog();
        }
 }
 
index bdf174c..d7d5f69 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/ifmcstat/ifmcstat.c,v 1.3.2.2 2001/07/03 11:02:06 ume Exp $
- * $DragonFly: src/usr.sbin/ifmcstat/ifmcstat.c,v 1.6 2004/01/06 03:17:22 dillon Exp $
+ * $DragonFly: src/usr.sbin/ifmcstat/ifmcstat.c,v 1.7 2004/12/18 22:48:03 swildner Exp $
  */
 
 #define _KERNEL_STRUCTURES
@@ -210,8 +210,7 @@ if6_addrlist(struct ifaddr *ifap)
                        KREAD(ifm.ifma_addr, &sa, struct sockaddr);
                        if (sa.sa_family != AF_INET6)
                                goto nextmulti;
-                       (void)in6_multientry((struct in6_multi *)
-                                            ifm.ifma_protospec);
+                       in6_multientry((struct in6_multi *)ifm.ifma_protospec);
                        if (ifm.ifma_lladdr == 0)
                                goto nextmulti;
                        KREAD(ifm.ifma_lladdr, &sdl, struct sockaddr_dl);
index 904b7b6..3fc357e 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/inetd/builtins.c,v 1.19.2.7 2002/07/22 14:05:56 fanf Exp $
- * $DragonFly: src/usr.sbin/inetd/builtins.c,v 1.4 2003/11/16 15:17:36 eirikn Exp $
+ * $DragonFly: src/usr.sbin/inetd/builtins.c,v 1.5 2004/12/18 22:48:03 swildner Exp $
  *
  */
 
@@ -151,7 +151,7 @@ chargen_dg(int s, struct servtab *sep)              /* Character generator */
                rs = ring;
        text[LINESIZ] = '\r';
        text[LINESIZ + 1] = '\n';
-       (void) sendto(s, text, sizeof(text), 0, (struct sockaddr *)&ss, size);
+       sendto(s, text, sizeof(text), 0, (struct sockaddr *)&ss, size);
 }
 
 /* ARGSUSED */
@@ -209,9 +209,8 @@ daytime_dg(int s, struct servtab *sep)              /* Return human-readable time of day */
        if (check_loop((struct sockaddr *)&ss, sep))
                return;
 
-       (void) sprintf(buffer, "%.24s\r\n", ctime(&now));
-       (void) sendto(s, buffer, strlen(buffer), 0,
-                     (struct sockaddr *)&ss, size);
+       sprintf(buffer, "%.24s\r\n", ctime(&now));
+       sendto(s, buffer, strlen(buffer), 0, (struct sockaddr *)&ss, size);
 }
 
 /* ARGSUSED */
@@ -223,8 +222,8 @@ daytime_stream(int s, struct servtab *sep __unused) /* Return human-readable tim
 
        now = time((time_t *) 0);
 
-       (void) sprintf(buffer, "%.24s\r\n", ctime(&now));
-       (void) send(s, buffer, strlen(buffer), MSG_EOF);
+       sprintf(buffer, "%.24s\r\n", ctime(&now));
+       send(s, buffer, strlen(buffer), MSG_EOF);
 }
 
 /*
@@ -238,7 +237,7 @@ discard_dg(int s, struct servtab *sep __unused) /* Discard service -- ignore dat
 {
        char buffer[BUFSIZE];
 
-       (void) read(s, buffer, sizeof(buffer));
+       read(s, buffer, sizeof(buffer));
 }
 
 /* ARGSUSED */
@@ -280,7 +279,7 @@ echo_dg(int s, struct servtab *sep) /* Echo service -- echo data back */
        if (check_loop((struct sockaddr *)&ss, sep))
                return;
 
-       (void) sendto(s, buffer, i, 0, (struct sockaddr *)&ss, size);
+       sendto(s, buffer, i, 0, (struct sockaddr *)&ss, size);
 }
 
 /* ARGSUSED */
@@ -708,7 +707,7 @@ machtime_dg(int s, struct servtab *sep)
                return;
 
        result = machtime();
-       (void) sendto(s, (char *) &result, sizeof(result), 0,
+       sendto(s, (char *) &result, sizeof(result), 0,
                      (struct sockaddr *)&ss, size);
 }
 
@@ -719,7 +718,7 @@ machtime_stream(int s, struct servtab *sep __unused)
        unsigned long result;
 
        result = machtime();
-       (void) send(s, (char *) &result, sizeof(result), MSG_EOF);
+       send(s, (char *) &result, sizeof(result), MSG_EOF);
 }
 
 /*
@@ -731,7 +730,7 @@ machtime_stream(int s, struct servtab *sep __unused)
  */
 
 #define MAX_SERV_LEN   (256+2)         /* 2 bytes for \r\n */
-#define strwrite(fd, buf)      (void) write(fd, buf, sizeof(buf)-1)
+#define strwrite(fd, buf)      write(fd, buf, sizeof(buf)-1)
 
 static int             /* # of characters upto \r,\n or \0 */
 getline(int fd, char *buf, int len)
@@ -786,7 +785,7 @@ tcpmux(int s)
                for (sep = servtab; sep; sep = sep->se_next) {
                        if (!ISMUX(sep))
                                continue;
-                       (void)write(s,sep->se_service,strlen(sep->se_service));
+                       write(s,sep->se_service,strlen(sep->se_service));
                        strwrite(s, "\r\n");
                }
                return (NULL);
index 83d1534..f1ec15f 100644 (file)
@@ -7,7 +7,7 @@
  * ----------------------------------------------------------------------------
  * 
  * $FreeBSD: src/usr.sbin/jail/jail.c,v 1.5.2.2 2003/05/08 13:04:24 maxim Exp $
- * $DragonFly: src/usr.sbin/jail/jail.c,v 1.3 2004/09/19 17:25:42 joerg Exp $
+ * $DragonFly: src/usr.sbin/jail/jail.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  * 
  */
 
@@ -96,7 +96,7 @@ static void
 usage(void)
 {
 
-       (void)fprintf(stderr, "%s\n",
+       fprintf(stderr, "%s\n",
            "Usage: jail [-u username] path hostname ip-number command ...");
        exit(1);
 }
index ae6bfc5..1574c1f 100644 (file)
@@ -28,7 +28,7 @@
  *
  * @(#)keyserv.c       1.15    94/04/25 SMI
  * $FreeBSD: src/usr.sbin/keyserv/keyserv.c,v 1.3.2.2 2001/07/19 10:58:22 roam Exp $
- * $DragonFly: src/usr.sbin/keyserv/keyserv.c,v 1.5 2004/05/20 19:24:42 cpressey Exp $
+ * $DragonFly: src/usr.sbin/keyserv/keyserv.c,v 1.6 2004/12/18 22:48:03 swildner Exp $
  */
 
 /*
@@ -150,7 +150,7 @@ main(int argc, char **argv)
        /*
         * Initialize
         */
-       (void) umask(066);      /* paranoia */
+       umask(066);     /* paranoia */
        if (geteuid() != 0)
                errx(1, "keyserv must be run as root");
        setmodulus(HEXMODULUS);
@@ -159,8 +159,8 @@ main(int argc, char **argv)
 
        /* Create services. */
 
-       (void) pmap_unset(KEY_PROG, KEY_VERS);
-       (void) pmap_unset(KEY_PROG, KEY_VERS2);
+       pmap_unset(KEY_PROG, KEY_VERS);
+       pmap_unset(KEY_PROG, KEY_VERS2);
        unlink(KEYSERVSOCK);
 
        transp = svcudp_create(RPC_ANYSOCK);
@@ -215,7 +215,7 @@ randomize(des_block *master)
 
        seed = 0;
        for (i = 0; i < 1024; i++) {
-               (void) gettimeofday(&tv, (struct timezone *) NULL);
+               gettimeofday(&tv, (struct timezone *) NULL);
                shift = i % 8 * sizeof (int);
                seed ^= (tv.tv_usec << shift) | (tv.tv_usec >> (32 - shift));
        }
@@ -258,10 +258,10 @@ getrootkey(des_block *master, int prompt)
                }
                if (read(fd, secret, HEXKEYBYTES) < HEXKEYBYTES) {
                        warnx("the key read from %s was too short", ROOTKEY);
-                       (void) close(fd);
+                       close(fd);
                        return (0);
                }
-               (void) close(fd);
+               close(fd);
                if (!getnetname(name)) {
                    warnx(
        "failed to generate host's netname when establishing root's key");
@@ -290,7 +290,7 @@ getrootkey(des_block *master, int prompt)
                warnx("password does not decrypt secret key for %s", name);
                return (0);
        }
-       (void) pk_setkey(0, secret);
+       pk_setkey(0, secret);
        /*
         * Store it for future use in $ROOTKEY, if possible
         */
@@ -331,13 +331,13 @@ key_set_1_svc_prog(uid_t uid, keybuf key)
        static keystatus status;
 
        if (debugging) {
-               (void) fprintf(stderr, "set(%ld, %.*s) = ", uid,
+               fprintf(stderr, "set(%ld, %.*s) = ", uid,
                                (int) sizeof (keybuf), key);
        }
        status = pk_setkey(uid, key);
        if (debugging) {
-               (void) fprintf(stderr, "%s\n", strstatus(status));
-               (void) fflush(stderr);
+               fprintf(stderr, "%s\n", strstatus(status));
+               fflush(stderr);
        }
        return (&status);
 }
@@ -348,7 +348,7 @@ key_encrypt_pk_2_svc_prog(uid_t uid, cryptkeyarg2 *arg)
        static cryptkeyres res;
 
        if (debugging) {
-               (void) fprintf(stderr, "encrypt(%ld, %s, %08x%08x) = ", uid,
+               fprintf(stderr, "encrypt(%ld, %s, %08x%08x) = ", uid,
                                arg->remotename, arg->deskey.key.high,
                                arg->deskey.key.low);
        }
@@ -357,13 +357,13 @@ key_encrypt_pk_2_svc_prog(uid_t uid, cryptkeyarg2 *arg)
                                &res.cryptkeyres_u.deskey);
        if (debugging) {
                if (res.status == KEY_SUCCESS) {
-                       (void) fprintf(stderr, "%08x%08x\n",
+                       fprintf(stderr, "%08x%08x\n",
                                        res.cryptkeyres_u.deskey.key.high,
                                        res.cryptkeyres_u.deskey.key.low);
                } else {
-                       (void) fprintf(stderr, "%s\n", strstatus(res.status));
+                       fprintf(stderr, "%s\n", strstatus(res.status));
                }
-               (void) fflush(stderr);
+               fflush(stderr);
        }
        return (&res);
 }
@@ -374,7 +374,7 @@ key_decrypt_pk_2_svc_prog(uid_t uid, cryptkeyarg2 *arg)
        static cryptkeyres res;
 
        if (debugging) {
-               (void) fprintf(stderr, "decrypt(%ld, %s, %08x%08x) = ", uid,
+               fprintf(stderr, "decrypt(%ld, %s, %08x%08x) = ", uid,
                                arg->remotename, arg->deskey.key.high,
                                arg->deskey.key.low);
        }
@@ -383,13 +383,13 @@ key_decrypt_pk_2_svc_prog(uid_t uid, cryptkeyarg2 *arg)
                                &res.cryptkeyres_u.deskey);
        if (debugging) {
                if (res.status == KEY_SUCCESS) {
-                       (void) fprintf(stderr, "%08x%08x\n",
+                       fprintf(stderr, "%08x%08x\n",
                                        res.cryptkeyres_u.deskey.key.high,
                                        res.cryptkeyres_u.deskey.key.low);
                } else {
-                       (void) fprintf(stderr, "%s\n", strstatus(res.status));
+                       fprintf(stderr, "%s\n", strstatus(res.status));
                }
-               (void) fflush(stderr);
+               fflush(stderr);
        }
        return (&res);
 }
@@ -400,7 +400,7 @@ key_net_put_2_svc_prog(uid_t uid, key_netstarg *arg)
        static keystatus status;
 
        if (debugging) {
-               (void) fprintf(stderr, "net_put(%s, %.*s, %.*s) = ",
+               fprintf(stderr, "net_put(%s, %.*s, %.*s) = ",
                        arg->st_netname, (int)sizeof (arg->st_pub_key),
                        arg->st_pub_key, (int)sizeof (arg->st_priv_key),
                        arg->st_priv_key);
@@ -409,8 +409,8 @@ key_net_put_2_svc_prog(uid_t uid, key_netstarg *arg)
        status = pk_netput(uid, arg);
 
        if (debugging) {
-               (void) fprintf(stderr, "%s\n", strstatus(status));
-               (void) fflush(stderr);
+               fprintf(stderr, "%s\n", strstatus(status));
+               fflush(stderr);
        }
 
        return (&status);
@@ -422,7 +422,7 @@ key_net_get_2_svc_prog(uid_t uid, void *arg)
        static key_netstres keynetname;
 
        if (debugging)
-               (void) fprintf(stderr, "net_get(%ld) = ", uid);
+               fprintf(stderr, "net_get(%ld) = ", uid);
 
        keynetname.status = pk_netget(uid, &keynetname.key_netstres_u.knet);
        if (debugging) {
@@ -434,9 +434,9 @@ key_net_get_2_svc_prog(uid_t uid, void *arg)
                        (int)sizeof (keynetname.key_netstres_u.knet.st_priv_key),
                        keynetname.key_netstres_u.knet.st_priv_key);
                } else {
-                       (void) fprintf(stderr, "NOT FOUND\n");
+                       fprintf(stderr, "NOT FOUND\n");
                }
-               (void) fflush(stderr);
+               fflush(stderr);
        }
 
        return (&keynetname);
@@ -449,7 +449,7 @@ key_get_conv_2_svc_prog(uid_t uid, keybuf arg)
        static cryptkeyres  res;
 
        if (debugging)
-               (void) fprintf(stderr, "get_conv(%ld, %.*s) = ", uid,
+               fprintf(stderr, "get_conv(%ld, %.*s) = ", uid,
                        (int)sizeof (arg), arg);
 
 
@@ -457,13 +457,13 @@ key_get_conv_2_svc_prog(uid_t uid, keybuf arg)
 
        if (debugging) {
                if (res.status == KEY_SUCCESS) {
-                       (void) fprintf(stderr, "%08x%08x\n",
+                       fprintf(stderr, "%08x%08x\n",
                                res.cryptkeyres_u.deskey.key.high,
                                res.cryptkeyres_u.deskey.key.low);
                } else {
-                       (void) fprintf(stderr, "%s\n", strstatus(res.status));
+                       fprintf(stderr, "%s\n", strstatus(res.status));
                }
-               (void) fflush(stderr);
+               fflush(stderr);
        }
        return (&res);
 }
@@ -475,7 +475,7 @@ key_encrypt_1_svc_prog(uid_t uid, cryptkeyarg *arg)
        static cryptkeyres res;
 
        if (debugging) {
-               (void) fprintf(stderr, "encrypt(%ld, %s, %08x%08x) = ", uid,
+               fprintf(stderr, "encrypt(%ld, %s, %08x%08x) = ", uid,
                                arg->remotename, arg->deskey.key.high,
                                arg->deskey.key.low);
        }
@@ -484,13 +484,13 @@ key_encrypt_1_svc_prog(uid_t uid, cryptkeyarg *arg)
                                &res.cryptkeyres_u.deskey);
        if (debugging) {
                if (res.status == KEY_SUCCESS) {
-                       (void) fprintf(stderr, "%08x%08x\n",
+                       fprintf(stderr, "%08x%08x\n",
                                        res.cryptkeyres_u.deskey.key.high,
                                        res.cryptkeyres_u.deskey.key.low);
                } else {
-                       (void) fprintf(stderr, "%s\n", strstatus(res.status));
+                       fprintf(stderr, "%s\n", strstatus(res.status));
                }
-               (void) fflush(stderr);
+               fflush(stderr);
        }
        return (&res);
 }
@@ -501,7 +501,7 @@ key_decrypt_1_svc_prog(uid_t uid, cryptkeyarg *arg)
        static cryptkeyres res;
 
        if (debugging) {
-               (void) fprintf(stderr, "decrypt(%ld, %s, %08x%08x) = ", uid,
+               fprintf(stderr, "decrypt(%ld, %s, %08x%08x) = ", uid,
                                arg->remotename, arg->deskey.key.high,
                                arg->deskey.key.low);
        }
@@ -510,13 +510,13 @@ key_decrypt_1_svc_prog(uid_t uid, cryptkeyarg *arg)
                                &res.cryptkeyres_u.deskey);
        if (debugging) {
                if (res.status == KEY_SUCCESS) {
-                       (void) fprintf(stderr, "%08x%08x\n",
+                       fprintf(stderr, "%08x%08x\n",
                                        res.cryptkeyres_u.deskey.key.high,
                                        res.cryptkeyres_u.deskey.key.low);
                } else {
-                       (void) fprintf(stderr, "%s\n", strstatus(res.status));
+                       fprintf(stderr, "%s\n", strstatus(res.status));
                }
-               (void) fflush(stderr);
+               fflush(stderr);
        }
        return (&res);
 }
@@ -529,7 +529,7 @@ key_gen_1_svc_prog(void *v, struct svc_req *s)
        static des_block keygen;
        static des_block key;
 
-       (void) gettimeofday(&time, (struct timezone *) NULL);
+       gettimeofday(&time, (struct timezone *) NULL);
        keygen.key.high += (time.tv_sec ^ time.tv_usec);
        keygen.key.low += (time.tv_sec ^ time.tv_usec);
        ecb_crypt((char *)&masterkey, (char *)&keygen, sizeof (keygen),
@@ -537,9 +537,9 @@ key_gen_1_svc_prog(void *v, struct svc_req *s)
        key = keygen;
        des_setparity((char *)&key);
        if (debugging) {
-               (void) fprintf(stderr, "gen() = %08x%08x\n", key.key.high,
+               fprintf(stderr, "gen() = %08x%08x\n", key.key.high,
                                        key.key.low);
-               (void) fflush(stderr);
+               fflush(stderr);
        }
        return (&key);
 }
@@ -560,14 +560,14 @@ key_getcred_1_svc_prog(uid_t uid, netnamestr *name)
                res.status = KEY_SUCCESS;
        }
        if (debugging) {
-               (void) fprintf(stderr, "getcred(%s) = ", *name);
+               fprintf(stderr, "getcred(%s) = ", *name);
                if (res.status == KEY_SUCCESS) {
-                       (void) fprintf(stderr, "uid=%d, gid=%d, grouplen=%d\n",
+                       fprintf(stderr, "uid=%d, gid=%d, grouplen=%d\n",
                                cred->uid, cred->gid, cred->gids.gids_len);
                } else {
-                       (void) fprintf(stderr, "%s\n", strstatus(res.status));
+                       fprintf(stderr, "%s\n", strstatus(res.status));
                }
-               (void) fflush(stderr);
+               fflush(stderr);
        }
        return (&res);
 }
@@ -680,16 +680,15 @@ keyprogram(struct svc_req *rqstp, SVCXPRT *transp)
        if (check_auth) {
                if (root_auth(transp, rqstp) == 0) {
                        if (debugging) {
-                               (void) fprintf(stderr,
-                               "not local privileged process\n");
+                               fprintf(stderr,
+                                       "not local privileged process\n");
                        }
                        svcerr_weakauth(transp);
                        return;
                }
                if (rqstp->rq_cred.oa_flavor != AUTH_SYS) {
                        if (debugging) {
-                               (void) fprintf(stderr,
-                               "not unix authentication\n");
+                               fprintf(stderr, "not unix authentication\n");
                        }
                        svcerr_weakauth(transp);
                        return;
@@ -705,13 +704,12 @@ keyprogram(struct svc_req *rqstp, SVCXPRT *transp)
        result = (*local) (uid, &argument);
        if (!svc_sendreply(transp, xdr_result, (char *) result)) {
                if (debugging)
-                       (void) fprintf(stderr, "unable to reply\n");
+                       fprintf(stderr, "unable to reply\n");
                svcerr_systemerr(transp);
        }
        if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument)) {
                if (debugging)
-                       (void) fprintf(stderr,
-                       "unable to free arguments\n");
+                       fprintf(stderr, "unable to free arguments\n");
                exit(1);
        }
        return;
@@ -762,8 +760,7 @@ root_auth(SVCXPRT *trans, struct svc_req *rqstp)
 static void
 usage(void)
 {
-       (void) fprintf(stderr,
-                       "usage: keyserv [-n] [-D] [-d] [-v] [-p path]\n");
-       (void) fprintf(stderr, "-d disables the use of default keys\n");
+       fprintf(stderr, "usage: keyserv [-n] [-D] [-d] [-v] [-p path]\n");
+       fprintf(stderr, "-d disables the use of default keys\n");
        exit(1);
 }
index 7c855fc..b5db919 100644 (file)
@@ -28,7 +28,7 @@
  *
  * @(#)setkey.c        1.11    94/04/25 SMI
  * $FreeBSD: src/usr.sbin/keyserv/setkey.c,v 1.3 1999/08/28 01:16:41 peter Exp $
- * $DragonFly: src/usr.sbin/keyserv/setkey.c,v 1.6 2004/05/20 19:24:42 cpressey Exp $
+ * $DragonFly: src/usr.sbin/keyserv/setkey.c,v 1.7 2004/12/18 22:48:03 swildner Exp $
  */
 
 /*
@@ -311,7 +311,7 @@ store_netname(uid_t uid, key_netstarg *netstore)
        } else {
                new = *l;
                if (new->keynetdata.st_netname)
-                       (void) free (new->keynetdata.st_netname);
+                       free(new->keynetdata.st_netname);
        }
        memcpy(new->keynetdata.st_priv_key, netstore->st_priv_key,
                HEXKEYBYTES);
index badef98..4b18637 100644 (file)
@@ -37,7 +37,7 @@
  *
  * @(#)common.c        8.5 (Berkeley) 4/28/95
  * $FreeBSD: src/usr.sbin/lpr/common_source/common.c,v 1.12.2.17 2002/07/14 23:58:52 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/common_source/common.c,v 1.3 2004/03/22 22:32:50 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/common_source/common.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -213,7 +213,7 @@ delay(int millisec)
                    "unreasonable delay period (%d)", millisec);
        tdelay.tv_sec = millisec / 1000;
        tdelay.tv_usec = millisec * 1000 % 1000000;
-       (void) select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tdelay);
+       select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tdelay);
 }
 
 char *
@@ -684,13 +684,13 @@ fatal(const struct printer *pp, const char *msg, ...)
        va_start(ap, msg);
        /* this error message is being sent to the 'from_host' */
        if (from_host != local_host)
-               (void)printf("%s: ", local_host);
-       (void)printf("%s: ", progname);
+               printf("%s: ", local_host);
+       printf("%s: ", progname);
        if (pp && pp->printer)
-               (void)printf("%s: ", pp->printer);
-       (void)vprintf(msg, ap);
+               printf("%s: ", pp->printer);
+       vprintf(msg, ap);
        va_end(ap);
-       (void)putchar('\n');
+       putchar('\n');
        exit(1);
 }
 
index fccab3c..a9b24f0 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)displayq.c      8.4 (Berkeley) 4/28/95
  * $FreeBSD: src/usr.sbin/lpr/common_source/displayq.c,v 1.15.2.8 2001/08/30 09:27:41 kris Exp $
- * $DragonFly: src/usr.sbin/lpr/common_source/displayq.c,v 1.3 2004/03/22 22:32:50 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/common_source/displayq.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -130,8 +130,8 @@ displayq(struct printer *pp, int format)
                        seteuid(uid);
                        if (fd >= 0) {
                                while ((i = read(fd, line, sizeof(line))) > 0)
-                                       (void) fwrite(line, 1, i, stdout);
-                               (void) close(fd);       /* unlocks as well */
+                                       fwrite(line, 1, i, stdout);
+                               close(fd);      /* unlocks as well */
                        } else
                                putchar('\n');
                }
@@ -193,7 +193,7 @@ displayq(struct printer *pp, int format)
                                } else
                                        putchar('\n');
                        }
-                       (void) fclose(fp);
+                       fclose(fp);
                }
                /*
                 * Now, examine the control files and print out the jobs to
@@ -220,25 +220,25 @@ displayq(struct printer *pp, int format)
         */
        if (nitems)
                putchar('\n');
-       (void) snprintf(line, sizeof(line), "%c%s", format ? '\4' : '\3',
-                       pp->remote_queue);
+       snprintf(line, sizeof(line), "%c%s", format ? '\4' : '\3',
+                pp->remote_queue);
        cp = line;
        for (i = 0; i < requests && cp-line+10 < sizeof(line) - 1; i++) {
                cp += strlen(cp);
-               (void) sprintf(cp, " %d", requ[i]);
+               sprintf(cp, " %d", requ[i]);
        }
        for (i = 0; i < users && cp - line + 1 + strlen(user[i]) < 
                sizeof(line) - 1; i++) {
                cp += strlen(cp);
                *cp++ = ' ';
-               (void) strcpy(cp, user[i]);
+               strcpy(cp, user[i]);
        }
        strcat(line, "\n");
        savealrm = signal(SIGALRM, alarmhandler);
        alarm(pp->conn_timeout);
        fd = getport(pp, pp->remote_host, 0);
        alarm(0);
-       (void)signal(SIGALRM, savealrm);
+       signal(SIGALRM, savealrm);
        if (fd < 0) {
                if (from_host != local_host)
                        printf("%s: ", local_host);
@@ -249,8 +249,8 @@ displayq(struct printer *pp, int format)
                if (write(fd, line, i) != i)
                        fatal(pp, "Lost connection");
                while ((i = read(fd, line, sizeof(line))) > 0)
-                       (void) fwrite(line, 1, i, stdout);
-               (void) close(fd);
+                       fwrite(line, 1, i, stdout);
+               close(fd);
        }
 }
 
@@ -519,9 +519,9 @@ prank(int n)
                return;
        }
        if ((n/10)%10 == 1)
-               (void)snprintf(rline, sizeof(rline), "%dth", n);
+               snprintf(rline, sizeof(rline), "%dth", n);
        else
-               (void)snprintf(rline, sizeof(rline), "%d%s", n, r[n%10]);
+               snprintf(rline, sizeof(rline), "%d%s", n, r[n%10]);
        col += strlen(rline);
        printf("%s", rline);
 }
index 0535da9..de74d28 100644 (file)
@@ -38,7 +38,7 @@
  *     From: @(#)common.c      8.5 (Berkeley) 4/28/95
  *
  * $FreeBSD: src/usr.sbin/lpr/common_source/net.c,v 1.3.2.4 2001/06/25 01:00:56 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/common_source/net.c,v 1.2 2003/06/17 04:29:56 dillon Exp $
+ * $DragonFly: src/usr.sbin/lpr/common_source/net.c,v 1.3 2004/12/18 22:48:03 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -136,7 +136,7 @@ retry:
        }
        if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0) {
                err = errno;
-               (void) close(s);
+               close(s);
                errno = err;
                /*
                 * This used to decrement lport, but the current semantics
index 56f3db4..964066e 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)rmjob.c 8.2 (Berkeley) 4/28/95
  * $FreeBSD: src/usr.sbin/lpr/common_source/rmjob.c,v 1.12.2.5 2001/06/25 01:00:56 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/common_source/rmjob.c,v 1.3 2004/03/22 22:32:50 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/common_source/rmjob.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -163,12 +163,12 @@ lockchk(struct printer *pp, char *slockf)
        }
        seteuid(uid);
        if (!getline(fp)) {
-               (void) fclose(fp);
+               fclose(fp);
                return(0);              /* no daemon present */
        }
        cur_daemon = atoi(line);
        if (kill(cur_daemon, 0) < 0 && errno != EPERM) {
-               (void) fclose(fp);
+               fclose(fp);
                return(0);              /* no daemon present */
        }
        for (i = 1; (n = fread(current, sizeof(char), sizeof(current), fp)) <= 0; i++) {
@@ -179,7 +179,7 @@ lockchk(struct printer *pp, char *slockf)
                sleep(i);
        }
        current[n-1] = '\0';
-       (void) fclose(fp);
+       fclose(fp);
        return(1);
 }
 
@@ -205,7 +205,7 @@ process(const struct printer *pp, char *file)
                        do_unlink(line+1);
                }
        }
-       (void) fclose(cfp);
+       fclose(cfp);
        do_unlink(file);
 }
 
@@ -252,7 +252,7 @@ chk(char *file)
                if (line[0] == 'P')
                        break;
        }
-       (void) fclose(cfp);
+       fclose(cfp);
        if (line[0] != 'P')
                return(0);
 
@@ -357,7 +357,7 @@ rmremote(const struct printer *pp)
        savealrm = signal(SIGALRM, alarmhandler);
        alarm(pp->conn_timeout);
        rem = getport(pp, pp->remote_host, 0);
-       (void)signal(SIGALRM, savealrm);
+       signal(SIGALRM, savealrm);
        if (rem < 0) {
                if (from_host != local_host)
                        printf("%s: ", local_host);
@@ -366,8 +366,8 @@ rmremote(const struct printer *pp)
                if (writev(rem, iov, niov) != totlen)
                        fatal(pp, "Lost connection");
                while ((i = read(rem, buf, sizeof(buf))) > 0)
-                       (void) fwrite(buf, 1, i, stdout);
-               (void) close(rem);
+                       fwrite(buf, 1, i, stdout);
+               close(rem);
        }
        for (i = 0; i < requests; i++)
                free(iov[firstreq + i].iov_base);
index 342f975..962b98f 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)startdaemon.c   8.2 (Berkeley) 4/17/94
  * $FreeBSD: src/usr.sbin/lpr/common_source/startdaemon.c,v 1.8.2.2 2002/04/26 18:24:40 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/common_source/startdaemon.c,v 1.3 2004/03/22 22:32:50 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/common_source/startdaemon.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -79,7 +79,7 @@ startdaemon(const struct printer *pp)
        if (connectres < 0) {
                warn("Unable to connect to %s", _PATH_SOCKETNAME);
                warnx("Check to see if the master 'lpd' process is running.");
-               (void) close(s);
+               close(s);
                return(0);
        }
 
@@ -89,18 +89,18 @@ startdaemon(const struct printer *pp)
         */
        if (writel(s, "\1", pp->printer, "\n", (char *)0) <= 0) {
                warn("write");
-               (void) close(s);
+               close(s);
                return(0);
        }
        if (read(s, &c, 1) == 1) {
                if (c == '\0') {                /* everything is OK */
-                       (void) close(s);
+                       close(s);
                        return(1);
                }
                putchar(c);
        }
        while ((n = read(s, &c, 1)) > 0)
                putchar(c);
-       (void) close(s);
+       close(s);
        return(0);
 }
index 1d31f3d..682682e 100644 (file)
@@ -34,7 +34,7 @@
  * @(#) Copyright (c) 1983, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)cmds.c  8.2 (Berkeley) 4/28/95
  * $FreeBSD: src/usr.sbin/lpr/lpc/cmds.c,v 1.14.2.16 2002/07/25 23:29:39 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/lpc/cmds.c,v 1.3 2004/03/22 22:32:50 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/lpc/cmds.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 /*
@@ -301,7 +301,7 @@ kill_qtask(const char *lf)
         * XXX - not sure I understand the reasoning behind this...
         */
        lockres = flock(fileno(fp), LOCK_SH|LOCK_NB);
-       (void) fclose(fp);
+       fclose(fp);
        if (lockres == 0)
                goto killdone;
 
@@ -369,12 +369,12 @@ upstat(struct printer *pp, const char *msg, int notifyuser)
                printf("\tcannot create status file: %s\n", strerror(errno));
                return;
        }
-       (void) ftruncate(fd, 0);
+       ftruncate(fd, 0);
        if (msg == (char *)NULL)
-               (void) write(fd, "\n", 1);
+               write(fd, "\n", 1);
        else
-               (void) write(fd, msg, strlen(msg));
-       (void) close(fd);
+               write(fd, msg, strlen(msg));
+       close(fd);
        if (notifyuser) {
                if ((msg == (char *)NULL) || (strcmp(msg, "\n") == 0))
                        printf("\tstatus message is now set to nothing.\n");
@@ -1070,22 +1070,22 @@ status(struct printer *pp)
                printf("\t%d entries in spool area\n", i);
        fd = open(file, O_RDONLY);
        if (fd < 0 || flock(fd, LOCK_SH|LOCK_NB) == 0) {
-               (void) close(fd);       /* unlocks as well */
+               close(fd);      /* unlocks as well */
                printf("\tprinter idle\n");
                return;
        }
-       (void) close(fd);
+       close(fd);
        /* print out the contents of the status file, if it exists */
        status_file_name(pp, file, sizeof file);
        fd = open(file, O_RDONLY|O_SHLOCK);
        if (fd >= 0) {
-               (void) fstat(fd, &stbuf);
+               fstat(fd, &stbuf);
                if (stbuf.st_size > 0) {
                        putchar('\t');
                        while ((i = read(fd, line, sizeof(line))) > 0)
-                               (void) fwrite(line, 1, i, stdout);
+                               fwrite(line, 1, i, stdout);
                }
-               (void) close(fd);       /* unlocks as well */
+               close(fd);      /* unlocks as well */
        }
 }
 
@@ -1177,7 +1177,7 @@ topq(int argc, char **argv)
         */
        seteuid(euid);
        if (changed && stat(pp->lock_file, &stbuf) >= 0)
-               (void) chmod(pp->lock_file, stbuf.st_mode | LFM_RESET_QUE);
+               chmod(pp->lock_file, stbuf.st_mode | LFM_RESET_QUE);
 
 out:
        seteuid(uid);
@@ -1262,7 +1262,7 @@ doarg(char *job)
                while (getline(fp) > 0)
                        if (line[0] == 'P')
                                break;
-               (void) fclose(fp);
+               fclose(fp);
                if (line[0] != 'P' || strcmp(job, line+1) != 0)
                        continue;
                if (touch(*qq) == 0) {
index c2286fb..b9e9f37 100644 (file)
@@ -34,7 +34,7 @@
  * @(#) Copyright (c) 1983, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)lpd.c   8.7 (Berkeley) 5/10/95
  * $FreeBSD: src/usr.sbin/lpr/lpd/lpd.c,v 1.12.2.22 2002/06/30 04:09:11 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/lpd/lpd.c,v 1.4 2004/03/22 22:32:50 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/lpd/lpd.c,v 1.5 2004/12/18 22:48:03 swildner Exp $
  */
 
 /*
@@ -266,7 +266,7 @@ main(int argc, char **argv)
        openlog("lpd", LOG_PID, LOG_LPR);
        syslog(LOG_INFO, "lpd startup: logging=%d%s%s", lflag,
            socket_debug ? " dbg" : "", sflag ? " net-secure" : "");
-       (void) umask(0);
+       umask(0);
        /*
         * NB: This depends on O_NONBLOCK semantics doing the right thing;
         * i.e., applying only to the O_EXLOCK and not to the rest of the
@@ -298,7 +298,7 @@ main(int argc, char **argv)
         * Restart all the printers.
         */
        startup();
-       (void) unlink(_PATH_SOCKETNAME);
+       unlink(_PATH_SOCKETNAME);
        funix = socket(AF_UNIX, SOCK_STREAM, 0);
        if (funix < 0) {
                syslog(LOG_ERR, "socket: %m");
@@ -312,7 +312,7 @@ main(int argc, char **argv)
        sigaddset(&nmask, SIGTERM);
        sigprocmask(SIG_BLOCK, &nmask, &omask);
 
-       (void) umask(07);
+       umask(07);
        signal(SIGHUP, mcleanup);
        signal(SIGINT, mcleanup);
        signal(SIGQUIT, mcleanup);
@@ -327,7 +327,7 @@ main(int argc, char **argv)
                syslog(LOG_ERR, "ubind: %m");
                exit(1);
        }
-       (void) umask(0);
+       umask(0);
        sigprocmask(SIG_SETMASK, &omask, (sigset_t *)0);
        FD_ZERO(&defreadfds);
        FD_SET(funix, &defreadfds);
@@ -395,13 +395,13 @@ main(int argc, char **argv)
                        signal(SIGINT, SIG_IGN);
                        signal(SIGQUIT, SIG_IGN);
                        signal(SIGTERM, SIG_IGN);
-                       (void) close(funix);
+                       close(funix);
                        if (sflag == 0 && finet) {
                                for (i = 1; i <= *finet; i++) 
-                                       (void)close(finet[i]);
+                                       close(finet[i]);
                        }
                        dup2(s, 1);
-                       (void) close(s);
+                       close(s);
                        if (domain == AF_INET) {
                                /* for both AF_INET and AF_INET6 */
                                from_remote = 1;
@@ -412,7 +412,7 @@ main(int argc, char **argv)
                        doit();
                        exit(0);
                }
-               (void) close(s);
+               close(s);
        }
 }
 
@@ -753,10 +753,10 @@ chkhost(struct sockaddr *f, int ch_opts)
 again:
        if (hostf) {
                if (__ivaliduser_sa(hostf, f, f->sa_len, DUMMY, DUMMY) == 0) {
-                       (void) fclose(hostf);
+                       fclose(hostf);
                        goto foundhost;
                }
-               (void) fclose(hostf);
+               fclose(hostf);
        }
        if (fpass == 1) {
                fpass = 2;
index a905e0e..a43f547 100644 (file)
@@ -34,7 +34,7 @@
  * @(#) Copyright (c) 1983, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)printjob.c      8.7 (Berkeley) 5/10/95
  * $FreeBSD: src/usr.sbin/lpr/lpd/printjob.c,v 1.22.2.32 2002/06/19 23:58:16 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/lpd/printjob.c,v 1.3 2004/03/22 22:32:50 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/lpd/printjob.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 /*
@@ -153,12 +153,12 @@ printjob(struct printer *pp)
 
        jobcount = 0;
        init(pp); /* set up capabilities */
-       (void) write(1, "", 1); /* ack that daemon is started */
-       (void) close(2);                        /* set up log file */
+       write(1, "", 1);        /* ack that daemon is started */
+       close(2);                       /* set up log file */
        if (open(pp->log_file, O_WRONLY|O_APPEND, LOG_FILE_MODE) < 0) {
                syslog(LOG_ERR, "%s: open(%s): %m", pp->printer,
                    pp->log_file);
-               (void) open(_PATH_DEVNULL, O_WRONLY);
+               open(_PATH_DEVNULL, O_WRONLY);
        }
        setgid(getegid());
        printpid = getpid();                    /* for use with lprm */
@@ -255,8 +255,8 @@ again:
                        continue;
                errcnt = 0;
        restart:
-               (void) lseek(lfd, pidoff, 0);
-               (void) snprintf(line, sizeof(line), "%s\n", q->job_cfname);
+               lseek(lfd, pidoff, 0);
+               snprintf(line, sizeof(line), "%s\n", q->job_cfname);
                i = strlen(line);
                if (write(lfd, line, i) != i)
                        syslog(LOG_ERR, "%s: write(%s): %m", pp->printer,
@@ -292,7 +292,7 @@ again:
                        syslog(LOG_INFO, "restarting %s", pp->printer);
                        if (of_pid > 0) {
                                kill(of_pid, SIGCONT); /* to be sure */
-                               (void) close(ofd);
+                               close(ofd);
                                while ((i = wait(NULL)) > 0 && i != of_pid)
                                        ;
                                if (i < 0)
@@ -300,7 +300,7 @@ again:
                                            pp->printer, of_pid);
                                of_pid = 0;
                        }
-                       (void) close(pfd);      /* close printer */
+                       close(pfd);     /* close printer */
                        if (ftruncate(lfd, pidoff) < 0)
                                syslog(LOG_WARNING, "%s: ftruncate(%s): %m", 
                                    pp->printer, pp->lock_file);
@@ -313,9 +313,9 @@ again:
                            q->job_cfname);
                        if (i == REPRINT) {
                                /* ensure we don't attempt this job again */
-                               (void) unlink(q->job_cfname);
+                               unlink(q->job_cfname);
                                q->job_cfname[0] = 'd';
-                               (void) unlink(q->job_cfname);
+                               unlink(q->job_cfname);
                                if (logname[0])
                                        sendmail(pp, logname, FATALERR);
                        }
@@ -334,15 +334,14 @@ again:
        done:
                if (jobcount > 0) {     /* jobs actually printed */
                        if (!pp->no_formfeed && !pp->tof)
-                               (void) write(ofd, pp->form_feed,
-                                            strlen(pp->form_feed));
+                               write(ofd, pp->form_feed,
+                                     strlen(pp->form_feed));
                        if (pp->trailer != NULL) /* output trailer */
-                               (void) write(ofd, pp->trailer,
-                                            strlen(pp->trailer));
+                               write(ofd, pp->trailer, strlen(pp->trailer));
                }
-               (void) close(ofd);
-               (void) wait(NULL);
-               (void) unlink(tempstderr);
+               close(ofd);
+               wait(NULL);
+               unlink(tempstderr);
                exit(0);
        }
        goto again;
@@ -534,7 +533,7 @@ printit(struct printer *pp, char *file)
                                        bombed = FATALERR;
                                break;
                        case REPRINT:
-                               (void) fclose(cfp);
+                               fclose(cfp);
                                return (REPRINT);
                        case FILTERERR:
                        case ACCESS:
@@ -570,13 +569,13 @@ pass2:
                case 'U':
                        if (strchr(line+1, '/'))
                                continue;
-                       (void) unlink(line+1);
+                       unlink(line+1);
                }
        /*
         * clean-up in case another control file exists
         */
-       (void) fclose(cfp);
-       (void) unlink(file);
+       fclose(cfp);
+       unlink(file);
        return (bombed == OK ? OK : ERROR);
 }
 
@@ -621,7 +620,7 @@ print(struct printer *pp, int format, char *file)
 
        /* everything seems OK, start it up */
        if (!pp->no_formfeed && !pp->tof) { /* start on a fresh page */
-               (void) write(ofd, pp->form_feed, strlen(pp->form_feed));
+               write(ofd, pp->form_feed, strlen(pp->form_feed));
                pp->tof = 1;
        }
        if (pp->filters[LPF_INPUT] == NULL
@@ -629,10 +628,10 @@ print(struct printer *pp, int format, char *file)
                pp->tof = 0;
                while ((n = read(fi, buf, BUFSIZ)) > 0)
                        if (write(ofd, buf, n) != n) {
-                               (void) close(fi);
+                               close(fi);
                                return (REPRINT);
                        }
-               (void) close(fi);
+               close(fi);
                return (OK);
        }
        switch (format) {
@@ -665,11 +664,11 @@ print(struct printer *pp, int format, char *file)
                        syslog(LOG_ERR, "cannot execl %s", _PATH_PR);
                        exit(2);
                }
-               (void) close(p[1]);             /* close output side */
-               (void) close(fi);
+               close(p[1]);            /* close output side */
+               close(fi);
                if (prchild < 0) {
                        prchild = 0;
-                       (void) close(p[0]);
+                       close(p[0]);
                        return (ERROR);
                }
                fi = p[0];                      /* use pipe for input */
@@ -708,20 +707,20 @@ print(struct printer *pp, int format, char *file)
        case 't':       /* print troff output */
        case 'n':       /* print ditroff output */
        case 'd':       /* print tex output */
-               (void) unlink(".railmag");
+               unlink(".railmag");
                if ((fo = creat(".railmag", FILMOD)) < 0) {
                        syslog(LOG_ERR, "%s: cannot create .railmag", 
                            pp->printer);
-                       (void) unlink(".railmag");
+                       unlink(".railmag");
                } else {
                        for (n = 0; n < 4; n++) {
                                if (fonts[n][0] != '/')
-                                       (void) write(fo, _PATH_VFONT,
-                                           sizeof(_PATH_VFONT) - 1);
-                               (void) write(fo, fonts[n], strlen(fonts[n]));
-                               (void) write(fo, "\n", 1);
+                                       write(fo, _PATH_VFONT,
+                                             sizeof(_PATH_VFONT) - 1);
+                               write(fo, fonts[n], strlen(fonts[n]));
+                               write(fo, "\n", 1);
                        }
-                       (void) close(fo);
+                       close(fo);
                }
                prog = (format == 't') ? pp->filters[LPF_TROFF] 
                        : ((format == 'n') ? pp->filters[LPF_DITROFF]
@@ -749,13 +748,13 @@ print(struct printer *pp, int format, char *file)
                n = 3;
                break;
        default:
-               (void) close(fi);
+               close(fi);
                syslog(LOG_ERR, "%s: illegal format character '%c'",
                    pp->printer, format);
                return (ERROR);
        }
        if (prog == NULL) {
-               (void) close(fi);
+               close(fi);
                syslog(LOG_ERR,
                   "%s: no filter found in printcap for format character '%c'",
                   pp->printer, format);
@@ -782,7 +781,7 @@ print(struct printer *pp, int format, char *file)
                            "%s: after stopping 'of', wait3() returned: %m",
                            pp->printer);
                else if (!WIFSTOPPED(wstatus)) {
-                       (void) close(fi);
+                       close(fi);
                        syslog(LOG_WARNING, "%s: output filter died "
                            "(pid=%d retcode=%d termsig=%d)",
                            pp->printer, of_pid, WEXITSTATUS(wstatus),
@@ -807,7 +806,7 @@ start:
                    prog);
                exit(2);
        }
-       (void) close(fi);
+       close(fi);
        wstatus_set = 0;
        if (child < 0)
                retcode = 100;
@@ -940,7 +939,7 @@ sendit(struct printer *pp, char *file)
                                        goto again;
                                break;
                        case REPRINT:
-                               (void) fclose(cfp);
+                               fclose(cfp);
                                return (REPRINT);
                        case ACCESS:
                                sendmail(pp, logname, ACCESS);
@@ -951,7 +950,7 @@ sendit(struct printer *pp, char *file)
                }
        }
        if (err == OK && sendfile(pp, '\2', file, '\0', 1) > 0) {
-               (void) fclose(cfp);
+               fclose(cfp);
                return (REPRINT);
        }
        /*
@@ -960,12 +959,12 @@ sendit(struct printer *pp, char *file)
        fseek(cfp, 0L, 0);
        while (getline(cfp))
                if (line[0] == 'U' && !strchr(line+1, '/'))
-                       (void) unlink(line+1);
+                       unlink(line+1);
        /*
         * clean-up in case another control file exists
         */
-       (void) fclose(cfp);
-       (void) unlink(file);
+       fclose(cfp);
+       unlink(file);
        return (err);
 }
 
@@ -1112,10 +1111,10 @@ sendagain:
        copycnt++;
 
        if (copycnt < 2)
-               (void) sprintf(buf, "%c%qd %s\n", type, stb.st_size, file);
+               sprintf(buf, "%c%qd %s\n", type, stb.st_size, file);
        else
-               (void) sprintf(buf, "%c%qd %s_c%d\n", type, stb.st_size,
-                   file, copycnt);
+               sprintf(buf, "%c%qd %s_c%d\n", type, stb.st_size, file,
+                       copycnt);
        amt = strlen(buf);
        for (i = 0;  ; i++) {
                if (write(pfd, buf, amt) != amt ||
@@ -1155,7 +1154,7 @@ sendagain:
        if (sizerr) {
                syslog(LOG_INFO, "%s: %s: changed size", pp->printer, file);
                /* tell recvjob to ignore this file */
-               (void) write(pfd, "\1", 1);
+               write(pfd, "\1", 1);
                sfres = ERROR;
                goto return_sfres;
        }
@@ -1190,7 +1189,7 @@ sendagain:
        sfres = OK;
 
 return_sfres:
-       (void)close(sfd);
+       close(sfd);
        if (tfd != -1) {
                /*
                 * If tfd is set, then it is the same value as sfd, and
@@ -1315,35 +1314,35 @@ banner(struct printer *pp, char *name1, char *name2)
 
        time(&tvec);
        if (!pp->no_formfeed && !pp->tof)
-               (void) write(ofd, pp->form_feed, strlen(pp->form_feed));
+               write(ofd, pp->form_feed, strlen(pp->form_feed));
        if (pp->short_banner) { /* short banner only */
                if (class[0]) {
-                       (void) write(ofd, class, strlen(class));
-                       (void) write(ofd, ":", 1);
+                       write(ofd, class, strlen(class));
+                       write(ofd, ":", 1);
                }
-               (void) write(ofd, name1, strlen(name1));
-               (void) write(ofd, "  Job: ", 7);
-               (void) write(ofd, name2, strlen(name2));
-               (void) write(ofd, "  Date: ", 8);
-               (void) write(ofd, ctime(&tvec), 24);
-               (void) write(ofd, "\n", 1);
+               write(ofd, name1, strlen(name1));
+               write(ofd, "  Job: ", 7);
+               write(ofd, name2, strlen(name2));
+               write(ofd, "  Date: ", 8);
+               write(ofd, ctime(&tvec), 24);
+               write(ofd, "\n", 1);
        } else {        /* normal banner */
-               (void) write(ofd, "\n\n\n", 3);
+               write(ofd, "\n\n\n", 3);
                scan_out(pp, ofd, name1, '\0');
-               (void) write(ofd, "\n\n", 2);
+               write(ofd, "\n\n", 2);
                scan_out(pp, ofd, name2, '\0');
                if (class[0]) {
-                       (void) write(ofd,"\n\n\n",3);
+                       write(ofd,"\n\n\n",3);
                        scan_out(pp, ofd, class, '\0');
                }
-               (void) write(ofd, "\n\n\n\n\t\t\t\t\tJob:  ", 15);
-               (void) write(ofd, name2, strlen(name2));
-               (void) write(ofd, "\n\t\t\t\t\tDate: ", 12);
-               (void) write(ofd, ctime(&tvec), 24);
-               (void) write(ofd, "\n", 1);
+               write(ofd, "\n\n\n\n\t\t\t\t\tJob:  ", 15);
+               write(ofd, name2, strlen(name2));
+               write(ofd, "\n\t\t\t\t\tDate: ", 12);
+               write(ofd, ctime(&tvec), 24);
+               write(ofd, "\n", 1);
        }
        if (!pp->no_formfeed)
-               (void) write(ofd, pp->form_feed, strlen(pp->form_feed));
+               write(ofd, pp->form_feed, strlen(pp->form_feed));
        pp->tof = 1;
 }
 
@@ -1389,7 +1388,7 @@ scan_out(struct printer *pp, int scfd, char *scsp, int dlm)
                        ;
                strp++;
                *strp++ = '\n';
-               (void) write(scfd, outbuf, strp-outbuf);
+               write(scfd, outbuf, strp-outbuf);
        }
 }
 
@@ -1472,20 +1471,20 @@ sendmail(struct printer *pp, char *userid, int bombed)
                        printf("\nhad the following errors and may not have printed:\n");
                        while ((i = getc(fp)) != EOF)
                                putchar(i);
-                       (void) fclose(fp);
+                       fclose(fp);
                        break;
                case ACCESS:
                        cp = "ACCESS";
                        printf("\nwas not printed because it was not linked to the original file\n");
                }
                fflush(stdout);
-               (void) close(1);
+               close(1);
        } else {
                syslog(LOG_WARNING, "unable to send mail to %s: %m", userid);
                return;
        }
-       (void) close(p[0]);
-       (void) close(p[1]);
+       close(p[0]);
+       close(p[1]);
        wait(NULL);
        syslog(LOG_INFO, "mail sent to user %s about job %s on printer %s (%s)",
            userid, *jobname ? jobname : "<unknown>", pp->printer, cp);
@@ -1579,7 +1578,7 @@ static void
 abortpr(int signo __unused)
 {
 
-       (void) unlink(tempstderr);
+       unlink(tempstderr);
        kill(0, SIGINT);
        if (of_pid > 0)
                kill(of_pid, SIGCONT);
@@ -1686,7 +1685,7 @@ openpr(const struct printer *pp)
                            pp->filters[LPF_OUTPUT]);
                        exit(1);
                }
-               (void) close(p[0]);             /* close input side */
+               close(p[0]);            /* close input side */
                ofd = p[1];                     /* use pipe for output */
        } else {
                ofd = pfd;
@@ -1721,7 +1720,7 @@ opennet(const struct printer *pp)
                alarm(pp->conn_timeout);
                pfd = getport(pp, ep, port);
                alarm(0);
-               (void)signal(SIGALRM, savealrm);
+               signal(SIGALRM, savealrm);
                if (pfd < 0 && errno == ECONNREFUSED)
                        resp = 1;
                else if (pfd >= 0) {
@@ -1792,14 +1791,14 @@ openrem(const struct printer *pp)
                alarm(pp->conn_timeout);
                pfd = getport(pp, pp->remote_host, 0);
                alarm(0);
-               (void)signal(SIGALRM, savealrm);
+               signal(SIGALRM, savealrm);
                if (pfd >= 0) {
                        if ((writel(pfd, "\2", pp->remote_queue, "\n", 
                                    (char *)0)
                             == 2 + strlen(pp->remote_queue))
                            && (resp = response(pp)) == 0)
                                break;
-                       (void) close(pfd);
+                       close(pfd);
                }
                if (i == 1) {
                        if (resp < 0)
@@ -1839,7 +1838,7 @@ setty(const struct printer *pp)
                char *s = strdup(pp->mode_set), *tmp;
 
                while ((tmp = strsep(&s, ",")) != NULL) {
-                       (void) msearch(tmp, &ttybuf);
+                       msearch(tmp, &ttybuf);
                }
        }
        if (pp->mode_set != 0 || pp->baud_rate > 0) {
index 0d92c13..6d05516 100644 (file)
@@ -34,7 +34,7 @@
  * @(#) Copyright (c) 1983, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)recvjob.c       8.2 (Berkeley) 4/27/95
  * $FreeBSD: src/usr.sbin/lpr/lpd/recvjob.c,v 1.14.2.13 2002/06/19 01:46:48 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/lpd/recvjob.c,v 1.3 2004/03/22 22:32:50 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/lpd/recvjob.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 /*
@@ -60,7 +60,7 @@
 #include "extern.h"
 #include "pathnames.h"
 
-#define ack()  (void) write(STDOUT_FILENO, sp, (size_t)1);
+#define ack()  write(STDOUT_FILENO, sp, (size_t)1);
 
 static char     dfname[NAME_MAX];      /* data files */
 static int      minfree;       /* keep at least minfree blocks available */
@@ -101,10 +101,10 @@ recvjob(const char *printer)
                break;
        }
        
-       (void) close(2);                        /* set up log file */
+       close(2);                       /* set up log file */
        if (open(pp->log_file, O_WRONLY|O_APPEND, 0664) < 0) {
                syslog(LOG_ERR, "%s: %m", pp->log_file);
-               (void) open(_PATH_DEVNULL, O_WRONLY);
+               open(_PATH_DEVNULL, O_WRONLY);
        }
 
        if (chdir(pp->spool_dir) < 0)
@@ -193,7 +193,7 @@ readjob(struct printer *pp)
                        tfname[sizeof (tfname) - 1] = '\0';
                        tfname[0] = 't';
                        if (!chksize(size)) {
-                               (void) write(STDOUT_FILENO, "\2", (size_t)1);
+                               write(STDOUT_FILENO, "\2", (size_t)1);
                                continue;
                        }
                        if (!readfile(pp, tfname, (size_t)size)) {
@@ -222,13 +222,13 @@ readjob(struct printer *pp)
                                /*NOTREACHED*/
                        }
                        if (!chksize(size)) {
-                               (void) write(STDOUT_FILENO, "\2", (size_t)1);
+                               write(STDOUT_FILENO, "\2", (size_t)1);
                                continue;
                        }
                        strlcpy(dfname, cp, sizeof(dfname));
                        dfcnt++;
                        trstat_init(pp, dfname, dfcnt);
-                       (void) readfile(pp, dfname, (size_t)size);
+                       readfile(pp, dfname, (size_t)size);
                        trstat_write(pp, TR_RECVING, (size_t)size, givenid,
                            from_host, givenhost);
                        continue;
@@ -279,14 +279,14 @@ readfile(struct printer *pp, char *file, size_t size)
                        break;
                }
        }
-       (void) close(fd);
+       close(fd);
        if (err) {
                frecverr("%s: write error on close(%s)", pp->printer, file);
                /*NOTREACHED*/
        }
        if (noresponse()) {             /* file sent had bad data in it */
                if (strchr(file, '/') == NULL)
-                       (void) unlink(file);
+                       unlink(file);
                return (0);
        }
        ack();
@@ -351,11 +351,11 @@ static void
 rcleanup(int signo __unused)
 {
        if (tfname[0] && strchr(tfname, '/') == NULL)
-               (void) unlink(tfname);
+               unlink(tfname);
        if (dfname[0] && strchr(dfname, '/') == NULL) {
                do {
                        do
-                               (void) unlink(dfname);
+                               unlink(dfname);
                        while (dfname[2]-- != 'A');
                        dfname[2] = 'z';
                } while (dfname[0]-- != 'd');
index e234dd8..a78fb1a 100644 (file)
@@ -39,7 +39,7 @@
  * @(#) Copyright (c) 1983, 1989, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)from: lpr.c     8.4 (Berkeley) 4/28/95
  * $FreeBSD: src/usr.sbin/lpr/lpr/lpr.c,v 1.32.2.11 2002/04/28 23:40:23 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/lpr/lpr.c,v 1.3 2004/03/22 22:32:51 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/lpr/lpr.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 /*
@@ -316,7 +316,7 @@ main(int argc, char *argv[])
        mktemps(pp);
        tfd = nfile(tfname);
        seteuid(euid);
-       (void) fchown(tfd, pp->daemon_user, -1);
+       fchown(tfd, pp->daemon_user, -1);
        /* owned by daemon for protection */
        seteuid(uid);
        card('H', local_host);
@@ -376,8 +376,8 @@ main(int argc, char *argv[])
                        continue;       /* file unreasonable */
 
                if (sflag && (cp = linked(arg)) != NULL) {
-                       (void) snprintf(buf, sizeof(buf), "%d %d", statb.st_dev,
-                               statb.st_ino);
+                       snprintf(buf, sizeof(buf), "%d %d", statb.st_dev,
+                                statb.st_ino);
                        card('S', buf);
                        if (format == 'p')
                                card('T', title ? title : arg);
@@ -475,14 +475,14 @@ main(int argc, char *argv[])
                        printf("%s: cannot open %s\n", progname, arg);
                } else {
                        copy(pp, i, arg);
-                       (void) close(i);
+                       close(i);
                        if (f && unlink(arg) < 0)
                                printf("%s: %s: not removed\n", progname, arg);
                }
        }
 
        if (nact) {
-               (void) close(tfd);
+               close(tfd);
                tfname[inchar]--;
                /*
                 * Touch the control file to fix position in the queue.
@@ -499,7 +499,7 @@ main(int argc, char *argv[])
                                tfname[inchar]++;
                                cleanup(0);
                        }
-                       (void) close(tfd);
+                       close(tfd);
                }
                if (link(tfname, cfname) < 0) {
                        printf("%s: cannot rename %s\n", progname, cfname);
@@ -552,7 +552,7 @@ copy(const struct printer *pp, int f, const char n[])
                        }
                }
        }
-       (void) close(fd);
+       close(fd);
        if (nc==0 && nr==0)
                printf("%s: %s: empty input file\n", progname,
                    f ? n : "stdin");
@@ -629,7 +629,7 @@ nfile(char *n)
 
        seteuid(euid);
        f = open(n, O_WRONLY | O_EXCL | O_CREAT, FILMOD);
-       (void) umask(oldumask);
+       umask(oldumask);
        if (f < 0) {
                printf("%s: cannot create %s\n", progname, n);
                cleanup(0);
@@ -723,7 +723,7 @@ test(const char *file)
                printf("%s: %s is an executable program", progname, file);
                goto error1;
        }
-       (void) close(fd);
+       close(fd);
        if (rflag) {
                /*
                 * aside: note that 'cp' is technically a 'const char *'
@@ -753,7 +753,7 @@ test(const char *file)
 
 error1:
        printf(" and is unprintable\n");
-       (void) close(fd);
+       close(fd);
        return(-1);
 }
 
@@ -834,7 +834,7 @@ mktemps(const struct printer *pp)
        char *cp;
        char buf[BUFSIZ];
 
-       (void) snprintf(buf, sizeof(buf), "%s/.seq", pp->spool_dir);
+       snprintf(buf, sizeof(buf), "%s/.seq", pp->spool_dir);
        seteuid(euid);
        if ((fd = open(buf, O_RDWR|O_CREAT, 0661)) < 0) {
                printf("%s: cannot create %s\n", progname, buf);
@@ -859,10 +859,10 @@ mktemps(const struct printer *pp)
        dfname = lmktemp(pp, "df", n, len);
        inchar = strlen(pp->spool_dir) + 3;
        n = (n + 1) % 1000;
-       (void) lseek(fd, (off_t)0, 0);
+       lseek(fd, (off_t)0, 0);
        snprintf(buf, sizeof(buf), "%03d\n", n);
-       (void) write(fd, buf, strlen(buf));
-       (void) close(fd);       /* unlocks as well */
+       write(fd, buf, strlen(buf));
+       close(fd);      /* unlocks as well */
 }
 
 /*
@@ -875,7 +875,6 @@ lmktemp(const struct printer *pp, const char *id, int num, int len)
 
        if ((s = malloc(len)) == NULL)
                errx(1, "out of memory");
-       (void) snprintf(s, len, "%s/%sA%03d%s", pp->spool_dir, id, num,
-           local_host);
+       snprintf(s, len, "%s/%sA%03d%s", pp->spool_dir, id, num, local_host);
        return(s);
 }
index 09baa81..171862c 100644 (file)
@@ -34,7 +34,7 @@
  * @(#) Copyright (c) 1983, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)pac.c   8.1 (Berkeley) 6/6/93
  * $FreeBSD: src/usr.sbin/lpr/pac/pac.c,v 1.10.2.4 2002/04/26 18:17:52 gad Exp $
- * $DragonFly: src/usr.sbin/lpr/pac/pac.c,v 1.3 2004/03/22 22:32:51 cpressey Exp $
+ * $DragonFly: src/usr.sbin/lpr/pac/pac.c,v 1.4 2004/12/18 22:48:03 swildner Exp $
  */
 
 /*
@@ -158,7 +158,7 @@ main(int argc, char **argv)
                                usage();
                        }
                }
-               (void) enter(--cp);
+               enter(--cp);
                allflag = 0;
        }
        if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
index 312d72d..ac05586 100644 (file)
@@ -1,7 +1,7 @@
 /*     $OpenBSD: mailwrapper.c,v 1.6 1999/12/17 05:06:28 mickey Exp $  */
 /*     $NetBSD: mailwrapper.c,v 1.3 1999/05/29 18:18:15 christos Exp $ */
 /* $FreeBSD: src/usr.sbin/mailwrapper/mailwrapper.c,v 1.4.2.3 2001/10/01 12:52:47 dd Exp $ */
-/* $DragonFly: src/usr.sbin/mailwrapper/mailwrapper.c,v 1.4 2003/11/22 11:38:13 eirikn Exp $ */
+/* $DragonFly: src/usr.sbin/mailwrapper/mailwrapper.c,v 1.5 2004/12/18 22:48:04 swildner Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -162,7 +162,7 @@ main(int argc, char **argv, char **envp)
                free(line);
        }
 
-       (void)fclose(config);
+       fclose(config);
 
        addarg(&al, NULL, 0);
        execve(to, al.argv, envp);
index e071f9e..9ef13a0 100644 (file)
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/mld6query/mld6.c,v 1.1.1.1.2.2 2001/07/03 11:02:06 ume Exp $
- * $DragonFly: src/usr.sbin/mld6query/mld6.c,v 1.3 2003/11/22 11:38:13 eirikn Exp $
+ * $DragonFly: src/usr.sbin/mld6query/mld6.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 #include <sys/param.h>
 #include <sys/uio.h>
@@ -137,8 +137,8 @@ main(int argc, char *argv[])
        itimer.it_interval.tv_usec = 0;
        itimer.it_value.tv_usec = 0;
 
-       (void)signal(SIGALRM, quit);
-       (void)setitimer(ITIMER_REAL, &itimer, NULL);
+       signal(SIGALRM, quit);
+       setitimer(ITIMER_REAL, &itimer, NULL);
 
        FD_ZERO(&fdset);
        for (;;) {
@@ -267,6 +267,6 @@ quit(int signum) {
 void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: mld6query ifname [addr]\n");
+       fprintf(stderr, "usage: mld6query ifname [addr]\n");
        exit(1);
 }
index 9d68eb6..5c55d39 100644 (file)
@@ -10,7 +10,7 @@
  * main.c,v 3.8.4.29 1998/03/01 01:49:00 fenner Exp
  *
  * $FreeBSD: src/usr.sbin/mrouted/main.c,v 1.16.2.4 2002/09/12 16:27:49 nectar Exp $
- * $DragonFly: src/usr.sbin/mrouted/main.c,v 1.4 2004/03/15 18:10:28 dillon Exp $
+ * $DragonFly: src/usr.sbin/mrouted/main.c,v 1.5 2004/12/18 22:48:04 swildner Exp $
  */
 
 /*
@@ -250,10 +250,10 @@ main(int argc, char **argv)
     }
 
 #ifdef LOG_DAEMON
-    (void)openlog("mrouted", LOG_PID, LOG_DAEMON);
-    (void)setlogmask(LOG_UPTO(LOG_NOTICE));
+    openlog("mrouted", LOG_PID, LOG_DAEMON);
+    setlogmask(LOG_UPTO(LOG_NOTICE));
 #else
-    (void)openlog("mrouted", LOG_PID);
+    openlog("mrouted", LOG_PID);
 #endif
     sprintf(versionstring, "mrouted version %s", todaysversion);
 
@@ -274,13 +274,13 @@ main(int argc, char **argv)
        fscanf(fp, "%d", &prev_genid);
        if (prev_genid == dvmrp_genid)
            dvmrp_genid++;
-       (void) fclose(fp);
+       fclose(fp);
     }
 
     fp = fopen(genidfilename, "w");
     if (fp != NULL) {
        fprintf(fp, "%d", dvmrp_genid);
-       (void) fclose(fp);
+       fclose(fp);
     }
 
     /* Start up the log rate-limiter */
@@ -373,20 +373,20 @@ main(int argc, char **argv)
 
        haveterminal = 0;
        if (fork()) exit(0);
-       (void)close(0);
-       (void)close(1);
-       (void)close(2);
-       (void)open("/", 0);
-       (void)dup2(0, 1);
-       (void)dup2(0, 2);
+       close(0);
+       close(1);
+       close(2);
+       open("/", 0);
+       dup2(0, 1);
+       dup2(0, 2);
 #if defined(SYSV) || defined(linux)
-       (void)setpgrp();
+       setpgrp();
 #else
 #ifdef TIOCNOTTY
        t = open(_PATH_TTY, 2);
        if (t >= 0) {
-           (void)ioctl(t, TIOCNOTTY, (char *)0);
-           (void)close(t);
+           ioctl(t, TIOCNOTTY, (char *)0);
+           close(t);
        }
 #else
        if (setsid() < 0)
@@ -398,7 +398,7 @@ main(int argc, char **argv)
     fp = fopen(pidfilename, "w");              
     if (fp != NULL) {
        fprintf(fp, "%d\n", (int)getpid());
-       (void) fclose(fp);
+       fclose(fp);
     }
 
     /* XXX HACK
@@ -775,7 +775,7 @@ fdump(void)
        dump_version(fp);
        dump_vifs(fp);
        dump_routes(fp);
-       (void) fclose(fp);
+       fclose(fp);
     }
 }
 
@@ -792,7 +792,7 @@ cdump(void)
     if (fp != NULL) {
        dump_version(fp);
        dump_cache(fp); 
-       (void) fclose(fp);
+       fclose(fp);
     }
 }
 
index 4c18c53..8370355 100644 (file)
  * The mtrace program is COPYRIGHT 1998 by Xerox Corporation.
  *
  * $FreeBSD: src/usr.sbin/mrouted/mtrace.c,v 1.17.2.3 2002/09/12 16:27:49 nectar Exp $
- * $DragonFly: src/usr.sbin/mrouted/mtrace.c,v 1.6 2004/12/16 03:39:05 dillon Exp $
+ * $DragonFly: src/usr.sbin/mrouted/mtrace.c,v 1.7 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <ctype.h>
 typedef unsigned int u_int32;  /* XXX */
 #include "mtrace.h"
 
-const char version[] = "$DragonFly: src/usr.sbin/mrouted/mtrace.c,v 1.6 2004/12/16 03:39:05 dillon Exp $";
+const char version[] = "$DragonFly: src/usr.sbin/mrouted/mtrace.c,v 1.7 2004/12/18 22:48:04 swildner Exp $";
 
 #define DEFAULT_TIMEOUT        3       /* How long to wait before retrying requests */
 #define DEFAULT_RETRIES 3      /* How many times to try */
@@ -816,7 +816,7 @@ proto_type(u_int type)
       case 0:
        return ("None");
       default:
-       (void) sprintf(buf, "Unknown protocol code %d", type);
+       sprintf(buf, "Unknown protocol code %d", type);
        return (buf);
     }
 }
@@ -855,7 +855,7 @@ flag_type(u_int type)
       case TR_ADMIN_PROHIB:
        return ("Admin. Prohibited");
       default:
-       (void) sprintf(buf, "Unknown error code %d", type);
+       sprintf(buf, "Unknown error code %d", type);
        return (buf);
     }
 }    
@@ -2186,12 +2186,12 @@ print_stats(struct resp_buf *base, struct resp_buf *prev, struct resp_buf *new,
        printf("Packet Statistics For     Only For Traffic\n");
     else
        printf("Overall     Packet Statistics For Traffic From\n");
-    (void)inet_fmt(base->qhdr.tr_src, s1);
+    inet_fmt(base->qhdr.tr_src, s1);
     printf("%-15s %-15s  ",
           ((b->tr_inaddr & smask) == (base->qhdr.tr_src & smask)) ?
                s1 : "   * * *       ",
           inet_fmt(base->qhdr.tr_raddr, s2));
-    (void)inet_fmt(base->igmp.igmp_group.s_addr, s2);
+    inet_fmt(base->igmp.igmp_group.s_addr, s2);
     if (tunstats)
        printf("All Multicast Traffic     From %s\n", s1);
     else
index 95edbd7..a0769ba 100644 (file)
@@ -1,5 +1,5 @@
 /*     $FreeBSD: src/usr.sbin/ndp/ndp.c,v 1.2.2.5 2001/08/13 02:58:26 sumikawa Exp $   */
-/*     $DragonFly: src/usr.sbin/ndp/ndp.c,v 1.4 2004/03/30 01:14:22 cpressey Exp $     */
+/*     $DragonFly: src/usr.sbin/ndp/ndp.c,v 1.5 2004/12/18 22:48:04 swildner Exp $     */
 /*     $KAME: ndp.c,v 1.65 2001/05/08 04:36:34 itojun Exp $    */
 
 /*
@@ -876,7 +876,7 @@ doit:
                l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
        } while (l > 0 && (rtm->rtm_seq != seq || rtm->rtm_pid != pid));
        if (l < 0)
-               (void) fprintf(stderr, "ndp: read from routing socket: %s\n",
+               fprintf(stderr, "ndp: read from routing socket: %s\n",
                    strerror(errno));
        return (0);
 }
@@ -1504,6 +1504,6 @@ ts_print(const struct timeval *tvp)
 
        /* Default */
        s = (tvp->tv_sec + thiszone) % 86400;
-       (void)printf("%02d:%02d:%02d.%06u ",
+       printf("%02d:%02d:%02d.%06u ",
            s / 3600, (s % 3600) / 60, s % 60, (u_int32_t)tvp->tv_usec);
 }
index 5824f9d..ecfe621 100644 (file)
@@ -17,7 +17,7 @@
  * warranty.
  *
  * $FreeBSD: src/usr.sbin/newsyslog/newsyslog.c,v 1.25.2.21 2003/05/12 23:41:29 gad Exp $
- * $DragonFly: src/usr.sbin/newsyslog/newsyslog.c,v 1.3 2004/08/30 19:27:22 eirikn Exp $
+ * $DragonFly: src/usr.sbin/newsyslog/newsyslog.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 /*
@@ -423,11 +423,11 @@ send_signal(const struct conf_entry *ent)
                        warnx("pid file is empty: %s",  ent->pid_file);
                else
                        warn("can't read from pid file: %s", ent->pid_file);
-               (void) fclose(f);
+               fclose(f);
                return (did_notify);
                /* NOTREACHED */
        }
-       (void) fclose(f);
+       fclose(f);
 
        target_name = "daemon";
        minok = MIN_PID;
@@ -496,11 +496,11 @@ parse_args(int argc, char **argv)
        char *p;
 
        timenow = time(NULL);
-       (void)strncpy(daytime, ctime(&timenow) + 4, 15);
+       strncpy(daytime, ctime(&timenow) + 4, 15);
        daytime[15] = '\0';
 
        /* Let's get our hostname */
-       (void)gethostname(hostname, sizeof(hostname));
+       gethostname(hostname, sizeof(hostname));
 
        /* Truncate domain */
        if ((p = strchr(hostname, '.')) != NULL)
@@ -599,7 +599,7 @@ get_worklist(char **files)
                err(1, "%s", conf);
 
        parse_file(f, fname, &worklist, &globlist, &defconf);
-       (void) fclose(f);
+       fclose(f);
 
        /*
         * All config-file information has been read in and turned into
@@ -1204,16 +1204,16 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags)
                        strlcpy(namepart, p + 1, sizeof(namepart));
 
                /* name of oldest log */
-               (void) snprintf(file1, sizeof(file1), "%s/%s.%d", dirpart,
+               snprintf(file1, sizeof(file1), "%s/%s.%d", dirpart,
                    namepart, numdays);
-               (void) snprintf(zfile1, sizeof(zfile1), "%s%s", file1,
+               snprintf(zfile1, sizeof(zfile1), "%s%s", file1,
                    COMPRESS_POSTFIX);
                snprintf(jfile1, sizeof(jfile1), "%s%s", file1,
                    BZCOMPRESS_POSTFIX);
        } else {
                /* name of oldest log */
-               (void) snprintf(file1, sizeof(file1), "%s.%d", log, numdays);
-               (void) snprintf(zfile1, sizeof(zfile1), "%s%s", file1,
+               snprintf(file1, sizeof(file1), "%s.%d", log, numdays);
+               snprintf(zfile1, sizeof(zfile1), "%s%s", file1,
                    COMPRESS_POSTFIX);
                snprintf(jfile1, sizeof(jfile1), "%s%s", file1,
                    BZCOMPRESS_POSTFIX);
@@ -1224,30 +1224,30 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags)
                printf("\trm -f %s\n", zfile1);
                printf("\trm -f %s\n", jfile1);
        } else {
-               (void) unlink(file1);
-               (void) unlink(zfile1);
-               (void) unlink(jfile1);
+               unlink(file1);
+               unlink(zfile1);
+               unlink(jfile1);
        }
 
        /* Move down log files */
        _numdays = numdays;     /* preserve */
        while (numdays--) {
 
-               (void) strlcpy(file2, file1, sizeof(file2));
+               strlcpy(file2, file1, sizeof(file2));
 
                if (archtodir)
-                       (void) snprintf(file1, sizeof(file1), "%s/%s.%d",
+                       snprintf(file1, sizeof(file1), "%s/%s.%d",
                            dirpart, namepart, numdays);
                else
-                       (void) snprintf(file1, sizeof(file1), "%s.%d", log,
+                       snprintf(file1, sizeof(file1), "%s.%d", log,
                            numdays);
 
-               (void) strlcpy(zfile1, file1, sizeof(zfile1));
-               (void) strlcpy(zfile2, file2, sizeof(zfile2));
+               strlcpy(zfile1, file1, sizeof(zfile1));
+               strlcpy(zfile2, file2, sizeof(zfile2));
                if (lstat(file1, &st)) {
-                       (void) strlcat(zfile1, COMPRESS_POSTFIX,
+                       strlcat(zfile1, COMPRESS_POSTFIX,
                            sizeof(zfile1));
-                       (void) strlcat(zfile2, COMPRESS_POSTFIX,
+                       strlcat(zfile2, COMPRESS_POSTFIX,
                            sizeof(zfile2));
                        if (lstat(zfile1, &st)) {
                                strlcpy(zfile1, file1, sizeof(zfile1));
@@ -1267,7 +1267,7 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags)
                                printf("\tchown %u:%u %s\n",
                                    ent->uid, ent->gid, zfile2);
                } else {
-                       (void) rename(zfile1, zfile2);
+                       rename(zfile1, zfile2);
                        if (chmod(zfile2, ent->permissions))
                                warn("can't chmod %s", file2);
                        if (ent->uid != (uid_t)-1 || ent->gid != (gid_t)-1)
@@ -1277,14 +1277,14 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags)
        }
        if (!noaction && !(flags & CE_BINARY)) {
                /* Report the trimming to the old log */
-               (void) log_trim(log, ent);
+               log_trim(log, ent);
        }
 
        if (!_numdays) {
                if (noaction)
                        printf("\trm %s\n", log);
                else
-                       (void) unlink(log);
+                       unlink(log);
        } else {
                if (noaction)
                        printf("\tmv %s to %s\n", log, file1);
@@ -1293,7 +1293,7 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags)
                                movefile(log, file1, ent->permissions, ent->uid,
                                    ent->gid);
                        else
-                               (void) rename(log, file1);
+                               rename(log, file1);
                }
        }
 
@@ -1313,7 +1313,7 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags)
                if (ent->uid != (uid_t)-1 || ent->gid != (gid_t)-1)
                        if (fchown(fd, ent->uid, ent->gid))
                            err(1, "can't chown new log file");
-               (void) close(fd);
+               close(fd);
                if (!(flags & CE_BINARY)) {
                        /* Add status message to new log file */
                        if (log_trim(tfile, ent))
@@ -1324,10 +1324,10 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags)
                printf("\tchmod %o %s\n", ent->permissions, tfile);
                printf("\tmv %s %s\n", tfile, log);
        } else {
-               (void) chmod(tfile, ent->permissions);
+               chmod(tfile, ent->permissions);
                if (rename(tfile, log) < 0) {
                        err(1, "can't start new log");
-                       (void) unlink(tfile);
+                       unlink(tfile);
                }
        }
 
@@ -1367,7 +1367,7 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags)
                                sleep(10);
                        }
                        if (archtodir) {
-                               (void) snprintf(file1, sizeof(file1), "%s/%s",
+                               snprintf(file1, sizeof(file1), "%s/%s",
                                    dirpart, namepart);
                                if (flags & CE_COMPACT)
                                        compress_log(file1,
@@ -1422,12 +1422,12 @@ compress_log(char *log, int dowait)
 
        while (dowait && (wait(NULL) > 0 || errno == EINTR))
                ;
-       (void) snprintf(tmp, sizeof(tmp), "%s.0", log);
+       snprintf(tmp, sizeof(tmp), "%s.0", log);
        pid = fork();
        if (pid < 0)
                err(1, "gzip fork");
        else if (!pid) {
-               (void) execl(_PATH_GZIP, _PATH_GZIP, "-f", tmp, (char *)0);
+               execl(_PATH_GZIP, _PATH_GZIP, "-f", tmp, (char *)0);
                err(1, _PATH_GZIP);
        }
 }
@@ -1495,7 +1495,7 @@ age_old_log(char *file)
                else
                        strlcat(tmp, p + 1, sizeof(tmp));
        } else {
-               (void) strlcpy(tmp, file, sizeof(tmp));
+               strlcpy(tmp, file, sizeof(tmp));
        }
 
        strlcat(tmp, ".0", sizeof(tmp));
@@ -1763,7 +1763,7 @@ createlog(const struct conf_entry *ent)
                        failed = fchown(fd, ent->uid, ent->gid);
                        if (failed)
                                err(1, "can't fchown temp file %s", tempfile);
-                       (void) close(fd);
+                       close(fd);
                }
        }
 
index af523d5..db993a0 100644 (file)
@@ -35,7 +35,7 @@
  * OF SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/nghook/main.c,v 1.4 1999/11/30 02:09:36 archie Exp $
- * $DragonFly: src/usr.sbin/nghook/main.c,v 1.2 2003/06/17 04:29:57 dillon Exp $
+ * $DragonFly: src/usr.sbin/nghook/main.c,v 1.3 2004/12/18 22:48:04 swildner Exp $
  * $Whistle: main.c,v 1.9 1999/01/20 00:26:26 archie Exp $
  */
 
@@ -204,7 +204,7 @@ WriteAscii(u_char *buf, int len)
                                    sizeof(sbuf) - strlen(sbuf), " ");
                snprintf(sbuf + strlen(sbuf),
                    sizeof(sbuf) - strlen(sbuf), "\n");
-               (void) write(1, sbuf, strlen(sbuf));
+               write(1, sbuf, strlen(sbuf));
        }
        ch = '\n';
        write(1, &ch, 1);
index 3ba731b..2ca0b00 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/usr.sbin/pccard/pccardd/pccardd.c,v 1.6.2.6 2001/08/02 18:51:38 imp Exp $
- * $DragonFly: src/usr.sbin/pccard/pccardd/Attic/pccardd.c,v 1.2 2003/06/17 04:29:59 dillon Exp $
+ * $DragonFly: src/usr.sbin/pccard/pccardd/Attic/pccardd.c,v 1.3 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <signal.h>
@@ -117,7 +117,7 @@ restart(void)
        }
        strcpy(sun.sun_path, socket_name);
        slen = SUN_LEN(&sun);
-       (void)unlink(socket_name);
+       unlink(socket_name);
        if (bind(server_sock, (struct sockaddr *) & sun, slen) < 0)
                die("bind failed");
        chown(socket_name, 0, 5);       /* XXX - root.operator */
@@ -130,7 +130,7 @@ static void
 term(int sig)
 {
        logmsg("pccardd terminated: signal %d received", sig);
-       (void)unlink(pid_file);
+       unlink(pid_file);
        exit(0);
 }
 
@@ -243,16 +243,16 @@ main(int argc, char *argv[])
        }
        strcpy(sun.sun_path, socket_name);
        slen = SUN_LEN(&sun);
-       (void)unlink(socket_name);
+       unlink(socket_name);
        if (bind(server_sock, (struct sockaddr *) & sun, slen) < 0)
                die("bind failed");
        chown(socket_name, 0, 5);       /* XXX - root.operator */
        chmod(socket_name, 0660);
        set_socket(server_sock);
 
-       (void)signal(SIGINT, dodebug ? term : SIG_IGN);
-       (void)signal(SIGTERM, term);
-       (void)signal(SIGHUP, (void (*)(int))restart);
+       signal(SIGINT, dodebug ? term : SIG_IGN);
+       signal(SIGTERM, term);
+       signal(SIGHUP, (void (*)(int))restart);
 
        for (;;) {
                fd_set  rmask, emask;
index e4155e8..86c4e8b 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #ident "$FreeBSD: src/usr.sbin/pcvt/kbdio/kbdio.y,v 1.6 1999/09/06 07:39:30 peter Exp $"
-#ident "$DragonFly: src/usr.sbin/pcvt/kbdio/Attic/kbdio.y,v 1.2 2003/06/17 04:29:59 dillon Exp $"
+#ident "$DragonFly: src/usr.sbin/pcvt/kbdio/Attic/kbdio.y,v 1.3 2004/12/18 22:48:04 swildner Exp $"
 
 /*
  * $Log: kbdio.y,v $
@@ -324,7 +324,7 @@ int main(int argc, char **argv) {
        }
        yyparse();
 
-       (void)ioctl(fd, KDDISABIO, 0);
+       ioctl(fd, KDDISABIO, 0);
        return 0;
 }
 
index 9697693..5bd8f50 100644 (file)
@@ -2,7 +2,7 @@
  * This code is derived from code available from the STB bulletin board
  *
  * $FreeBSD: src/usr.sbin/pcvt/set2061/ICD2061Aalt.c,v 1.5 1999/12/29 05:07:54 peter Exp $
- * $DragonFly: src/usr.sbin/pcvt/set2061/Attic/ICD2061Aalt.c,v 1.3 2004/03/24 17:46:23 cpressey Exp $
+ * $DragonFly: src/usr.sbin/pcvt/set2061/Attic/ICD2061Aalt.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 /* $XFree86: mit/server/ddx/x386/common_hw/ICD2061Aalt.c,v 2.6 1994/04/15 05:10:30 dawes Exp $ */
@@ -211,7 +211,7 @@ init_clock(unsigned long setup, unsigned short crtcport)
    unsigned char c;
 
 #ifndef PCVT_STANDALONE
-   (void)xf86DisableInterrupts();
+   xf86DisableInterrupts();
 #endif
 
    oldclk = inb(0x3CC);
index 7a96916..9938f02 100644 (file)
@@ -21,7 +21,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  *
  * $FreeBSD: src/usr.sbin/pcvt/set2061/compiler.h,v 1.5 1999/08/28 05:11:28 peter Exp $
- * $DragonFly: src/usr.sbin/pcvt/set2061/Attic/compiler.h,v 1.2 2003/06/17 04:29:59 dillon Exp $
+ * $DragonFly: src/usr.sbin/pcvt/set2061/Attic/compiler.h,v 1.3 2004/12/18 22:48:04 swildner Exp $
  */
 
 
@@ -232,7 +232,7 @@ unsigned char ind;
 #endif
 {
        if (port == 0x3C0)              /* reset attribute flip-flop */
-               (void) inb(0x3DA);
+               inb(0x3DA);
        outb(port, ind);
        return(inb(port+1));
 }
index 4ebde2c..daa8fd2 100644 (file)
@@ -29,7 +29,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $DragonFly: src/usr.sbin/pcvt/set2061/Attic/main.c,v 1.2 2004/03/24 17:46:23 cpressey Exp $
+ * $DragonFly: src/usr.sbin/pcvt/set2061/Attic/main.c,v 1.3 2004/12/18 22:48:04 swildner Exp $
  */
 
 static char *id =
@@ -98,7 +98,7 @@ main(int argc, char **argv)
 
        AltICD2061SetClock(freq, no);
 
-       (void)ioctl(fd, KDDISABIO, 0);
+       ioctl(fd, KDDISABIO, 0);
 
        exit(0);
 }
index 5bb19ca..77ab562 100644 (file)
@@ -34,7 +34,7 @@
  */
 
 #ident "$FreeBSD: src/usr.sbin/pcvt/vgaio/vgaio.y,v 1.5 1999/09/06 07:39:30 peter Exp $"
-#ident "$DragonFly: src/usr.sbin/pcvt/vgaio/Attic/vgaio.y,v 1.2 2003/06/17 04:29:59 dillon Exp $"
+#ident "$DragonFly: src/usr.sbin/pcvt/vgaio/Attic/vgaio.y,v 1.3 2004/12/18 22:48:04 swildner Exp $"
 
 /*
  * $Log: vgaio.y,v $
@@ -172,7 +172,7 @@ void getreg(struct reg r) {
 
        case AR:
                r.num &= 0x1f;
-               (void)inb(vgabase + 0x0a);
+               inb(vgabase + 0x0a);
                outb(0x3c0, r.num + 0x20);
                val = inb(0x3c1);
                break;
@@ -204,7 +204,7 @@ void setreg(struct reg r, int val) {
 
        case AR:
                r.num &= 0x1f;
-               (void)inb(vgabase + 0x0a);
+               inb(vgabase + 0x0a);
                outb(0x3c0, r.num);
                outb(0x3c0, val);
                outb(0x3c0, r.num + 0x20);
@@ -247,6 +247,6 @@ int main(int argc, char **argv) {
        vgabase = (inb(0x3cc) & 1)? 0x3d0: 0x3b0;
        yyparse();
 
-       (void)ioctl(fd, KDDISABIO, 0);
+       ioctl(fd, KDDISABIO, 0);
        return 0;
 }
index 2a521a6..8872c89 100644 (file)
@@ -1,5 +1,5 @@
 /*     $OpenBSD: pflogd.c,v 1.27 2004/02/13 19:01:57 otto Exp $        */
-/*     $DragonFly: src/usr.sbin/pflogd/pflogd.c,v 1.1 2004/09/21 21:25:28 joerg Exp $ */
+/*     $DragonFly: src/usr.sbin/pflogd/pflogd.c,v 1.2 2004/12/18 22:48:04 swildner Exp $ */
 
 /*
  * Copyright (c) 2001 Theo de Raadt
@@ -329,7 +329,7 @@ scan_dump(FILE *fp, off_t size)
         *
         * XXX this may take a long time for large logs.
         */
-       (void) fseek(fp, 0L, SEEK_SET);
+       fseek(fp, 0L, SEEK_SET);
 
        if (fread((char *)&hdr, sizeof(hdr), 1, fp) != 1) {
                logmsg(LOG_ERR, "Short file header");
@@ -559,7 +559,7 @@ main(int argc, char **argv)
                pidfile(NULL);
        }
 
-       (void)umask(S_IRWXG | S_IRWXO);
+       umask(S_IRWXG | S_IRWXO);
 
        /* filter will be used by the privileged process */
        if (argc) {
index 34607c3..41a08ea 100644 (file)
@@ -17,7 +17,7 @@
  * This is the package extraction code for the add module.
  *
  * $FreeBSD: src/usr.sbin/pkg_install/add/extract.c,v 1.42 2004/07/28 07:19:15 kan Exp $
- * $DragonFly: src/usr.sbin/pkg_install/add/Attic/extract.c,v 1.3 2004/07/30 04:46:12 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/add/Attic/extract.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <ctype.h>
@@ -61,8 +61,8 @@ rollback(const char *name, const char *home, PackingList start, PackingList stop
        if (q->type == PLIST_FILE) {
            snprintf(try, FILENAME_MAX, "%s/%s", dir, q->name);
            if (make_preserve_name(bup, FILENAME_MAX, name, try) && fexists(bup)) {
-               (void)chflags(try, 0);
-               (void)unlink(try);
+               chflags(try, 0);
+               unlink(try);
                if (rename(bup, try))
                    warnx("rollback: unable to rename %s back to %s", bup, try);
            }
@@ -154,7 +154,7 @@ extract_plist(const char *home, Package *pkg)
                /* first try to rename it into place */
                snprintf(try, FILENAME_MAX, "%s/%s", Directory, p->name);
                if (fexists(try)) {
-                   (void)chflags(try, 0);      /* XXX hack - if truly immutable, rename fails */
+                   chflags(try, 0);    /* XXX hack - if truly immutable, rename fails */
                    if (preserve && PkgName) {
                        char pf[FILENAME_MAX];
 
index 83d107a..9c65240 100644 (file)
@@ -17,7 +17,7 @@
  * This is the main body of the add module.
  *
  * $FreeBSD: src/usr.sbin/pkg_install/add/perform.c,v 1.77 2004/07/28 16:03:13 stefanf Exp $
- * $DragonFly: src/usr.sbin/pkg_install/add/Attic/perform.c,v 1.4 2004/07/30 04:46:12 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/add/Attic/perform.c,v 1.5 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <err.h>
@@ -540,7 +540,7 @@ pkg_do(char *pkg)
            while (fgets(buf, sizeof(buf), fp))
                fputs(buf, stdout);
            putc('\n', stdout);
-           (void) fclose(fp);
+           fclose(fp);
        } else
            warnx("cannot open %s as display file", buf);
     }
index d389532..686324f 100644 (file)
@@ -17,7 +17,7 @@
  * This is the main body of the create module.
  *
  * $FreeBSD: src/usr.sbin/pkg_install/create/perform.c,v 1.79 2004/07/28 07:19:15 kan Exp $
- * $DragonFly: src/usr.sbin/pkg_install/create/Attic/perform.c,v 1.3 2004/07/30 04:46:12 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/create/Attic/perform.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include "lib.h"
@@ -209,10 +209,10 @@ pkg_perform(char **pkgs)
 
     /* Make first "real contents" pass over it */
     check_list(home, &plist);
-    (void) umask(022); /*
-                        * Make sure gen'ed directories, files don't have
-                        * group or other write bits.
-                        */
+    umask(022);        /*
+                * Make sure gen'ed directories, files don't have
+                * group or other write bits.
+                */
     /* copy_plist(home, &plist); */
     /* mark_plist(&plist); */
 
index 5c4a3b6..38dc53c 100644 (file)
@@ -18,7 +18,7 @@
  * This is the delete module.
  *
  * $FreeBSD: src/usr.sbin/pkg_install/delete/main.c,v 1.26 2004/06/29 18:54:47 eik Exp $
- * $DragonFly: src/usr.sbin/pkg_install/delete/Attic/main.c,v 1.4 2004/07/30 04:46:13 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/delete/Attic/main.c,v 1.5 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -134,7 +134,7 @@ main(int argc, char **argv)
        warnx("missing package name(s)"), usage();
     *pkgs = NULL;
     tmp = LOG_DIR;
-    (void) stat(tmp, &stat_s);
+    stat(tmp, &stat_s);
     if (!Fake && getuid() && geteuid() != stat_s.st_uid) {
        if (!Force)
            errx(1, "you do not own %s, use -f to force", tmp);
index 46c5b54..622f6b0 100644 (file)
@@ -17,7 +17,7 @@
  * This is the main body of the delete module.
  *
  * $FreeBSD: src/usr.sbin/pkg_install/delete/perform.c,v 1.41 2004/06/29 19:06:41 eik Exp $
- * $DragonFly: src/usr.sbin/pkg_install/delete/Attic/perform.c,v 1.3 2004/07/30 04:46:13 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/delete/Attic/perform.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <err.h>
@@ -176,8 +176,8 @@ pkg_do(char *pkg)
     if (Interactive == TRUE) {
        int first, ch;
 
-       (void)fprintf(stderr, "delete %s? ", pkg);
-       (void)fflush(stderr);
+       fprintf(stderr, "delete %s? ", pkg);
+       fflush(stderr);
        first = ch = getchar();
        while (ch != '\n' && ch != EOF)
            ch = getchar();
index ccaea80..9fc821a 100644 (file)
@@ -17,7 +17,7 @@
  * Miscellaneous file access utilities.
  *
  * $FreeBSD: src/usr.sbin/pkg_install/lib/file.c,v 1.68 2004/07/28 16:03:13 stefanf Exp $
- * $DragonFly: src/usr.sbin/pkg_install/lib/Attic/file.c,v 1.3 2004/07/30 04:46:13 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/lib/Attic/file.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include "lib.h"
@@ -67,7 +67,7 @@ isemptydir(const char *fname)
                return FALSE;
            }
        }
-       (void)closedir(dirp);
+       closedir(dirp);
        return TRUE;
     }
     return FALSE;
index 59ac1c7..49ae848 100644 (file)
@@ -28,7 +28,7 @@
  *
  * $OpenBSD: pgp_check.c,v 1.2 1999/10/07 16:30:32 espie Exp $
  * $FreeBSD: src/usr.sbin/pkg_install/sign/pgp_check.c,v 1.2 2002/04/01 09:39:07 obrien Exp $
- * $DragonFly: src/usr.sbin/pkg_install/sign/Attic/pgp_check.c,v 1.3 2004/07/30 04:46:14 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/sign/Attic/pgp_check.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <stdio.h>
@@ -134,12 +134,12 @@ new_pgp_checker(h, sign, userid, envp, filename)
                /*@notreached@*/
                break;
        default:
-               (void)close(topgpcheck[0]);
+               close(topgpcheck[0]);
                break;
        }
        n->fdout = topgpcheck[1];
                /* so that subsequent fork() won't duplicate it inadvertently */
-       (void)fcntl(n->fdout, F_SETFD, FD_CLOEXEC);     
+       fcntl(n->fdout, F_SETFD, FD_CLOEXEC);   
 #ifdef DEBUG_DUMP
        n->out = fopen("compare", "w");
 #endif
index e050398..0f254bc 100644 (file)
@@ -28,7 +28,7 @@
  *
  * $OpenBSD: pgp_sign.c,v 1.1 1999/10/04 21:46:29 espie Exp $
  * $FreeBSD: src/usr.sbin/pkg_install/sign/pgp_sign.c,v 1.5 2004/06/29 19:06:42 eik Exp $
- * $DragonFly: src/usr.sbin/pkg_install/sign/Attic/pgp_sign.c,v 1.3 2004/07/30 04:46:14 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/sign/Attic/pgp_sign.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -125,33 +125,33 @@ retrieve_pgp_signature(filename, sign, userid, envp)
        }
        if (pipe(frompgp) == -1) {
                fclose(orig);
-               (void)close(topgp[0]);
-               (void)close(topgp[1]);
+               close(topgp[0]);
+               close(topgp[1]);
                return 0;
        }
        switch(pgpid = fork()) {
        case 0:
-               (void)close(topgp[1]);
-               (void)close(frompgp[0]);
+               close(topgp[1]);
+               close(frompgp[0]);
                pgpsign(topgp[0], frompgp[1], userid, envp);
                /*NOT REACHED */
        case -1:
-               (void)close(topgp[0]);
-               (void)close(topgp[1]);
-               (void)close(frompgp[0]);
-               (void)close(frompgp[1]);
+               close(topgp[0]);
+               close(topgp[1]);
+               close(frompgp[0]);
+               close(frompgp[1]);
                fclose(orig);
                return 0;
        default:
-               (void)close(topgp[0]);
-               (void)close(frompgp[1]);
+               close(topgp[0]);
+               close(frompgp[1]);
        }
 
        dest = fdopen(topgp[1], "w");
        if (dest == NULL) {
-               (void)close(topgp[1]);
-               (void)close(frompgp[0]);
-               (void)reap(pgpid);
+               close(topgp[1]);
+               close(frompgp[0]);
+               reap(pgpid);
                return 0;
        }
 
@@ -174,7 +174,7 @@ retrieve_pgp_signature(filename, sign, userid, envp)
 
        signin = fdopen(frompgp[0], "r");
        if (signin == NULL) {
-               (void)close(frompgp[0]);
+               close(frompgp[0]);
        } else {
                enum { NONE, FIRST, DONE, COPY} magic = NONE;
                int c;
@@ -253,7 +253,7 @@ return;
                exit(EXIT_FAILURE);
        case 0:
                {
-                       (void)close(fd[0]);
+                       close(fd[0]);
                                /*
                                 * The child fills the pipe with copies of the passphrase.
                                 * Expect violent death when father exits.
@@ -261,8 +261,8 @@ return;
                        printf("Child process %d stuffing passphrase in pipe:\n", getpid());
                        for(;;) {
                                char c = '\n';
-                               (void)write(fd[1], p, strlen(p));
-                               (void)write(fd[1], &c, 1);
+                               write(fd[1], p, strlen(p));
+                               write(fd[1], &c, 1);
                                putchar('.'); fflush(stdout);
                        }
                }
@@ -271,9 +271,9 @@ return;
                        char buf[10];
 
                        sleep(1);
-                       (void)close(fd[1]);
-                       (void)sprintf(buf, "%d", fd[0]);
-                       (void)setenv("PGPPASSFD", buf, 1);
+                       close(fd[1]);
+                       sprintf(buf, "%d", fd[0]);
+                       setenv("PGPPASSFD", buf, 1);
                        printf("Parent process PGPPASSFD=%d.\n", fd[0]);
                }
        }
index c104c0a..df9fd1d 100644 (file)
@@ -28,7 +28,7 @@
  *
  * $OpenBSD: sha1.c,v 1.1 1999/10/04 21:46:29 espie Exp $
  * $FreeBSD: src/usr.sbin/pkg_install/sign/sha1.c,v 1.5 2004/06/29 19:06:42 eik Exp $
- * $DragonFly: src/usr.sbin/pkg_install/sign/Attic/sha1.c,v 1.3 2004/07/30 04:46:14 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/sign/Attic/sha1.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -223,7 +223,7 @@ retrieve_sha1_marker(filename, sign, userid)
                return 0;
        }
 
-       (void)sha1_build_checksum(result, checker);
+       sha1_build_checksum(result, checker);
        fputs(result, stderr);
        return 1;
 }
index d248cce..f9946fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * $FreeBSD: src/usr.sbin/pkg_install/sign/stand.c,v 1.2 2002/04/01 09:39:07 obrien Exp $
- * $DragonFly: src/usr.sbin/pkg_install/sign/Attic/stand.c,v 1.3 2004/07/30 04:46:14 dillon Exp $
+ * $DragonFly: src/usr.sbin/pkg_install/sign/Attic/stand.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include "stand.h"
@@ -33,12 +33,12 @@ warn(const char *fmt, ...)
        va_start(ap, fmt);
 
        interrno = errno;
-       (void)fprintf(stderr, "%s: ", program_name);
+       fprintf(stderr, "%s: ", program_name);
        if (fmt != NULL) {
-               (void)vfprintf(stderr, fmt, ap);
-               (void)fprintf(stderr, ": ");
+               vfprintf(stderr, fmt, ap);
+               fprintf(stderr, ": ");
        }
-       (void)fprintf(stderr, "%s\n", strerror(interrno));
+       fprintf(stderr, "%s\n", strerror(interrno));
 
        va_end(ap);
 }
@@ -49,10 +49,10 @@ warnx(const char *fmt, ...)
        va_list ap;
 
        va_start(ap, fmt);
-       (void)fprintf(stderr, "%s: ", program_name);
+       fprintf(stderr, "%s: ", program_name);
        if (fmt != NULL) 
-               (void)vfprintf(stderr, fmt, ap);
-       (void)fprintf(stderr, "\n");
+               vfprintf(stderr, fmt, ap);
+       fprintf(stderr, "\n");
        va_end(ap);
 }
 
index 45ab854..0bff21d 100644 (file)
@@ -32,7 +32,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * $FreeBSD: src/usr.sbin/pppd/auth.c,v 1.24.2.2 2002/03/12 08:55:22 maxim Exp $
- * $DragonFly: src/usr.sbin/pppd/auth.c,v 1.3 2003/11/03 19:31:40 eirikn Exp $
+ * $DragonFly: src/usr.sbin/pppd/auth.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <stdio.h>
@@ -755,7 +755,7 @@ checkfile(fname, name)
                                        break;
                                }
                        }
-               (void) fclose(fd);
+               fclose(fd);
        } else {
                return(2);
        }
@@ -865,7 +865,7 @@ plogin(user, passwd, msg, msglen)
 /*
  * Define the fields for the credintial validation
  */
-    (void) pam_set_item (pamh, PAM_TTY, devnam);
+    pam_set_item (pamh, PAM_TTY, devnam);
     PAM_username = user;
     PAM_password = passwd;
 /*
@@ -877,7 +877,7 @@ plogin(user, passwd, msg, msglen)
 
        /* start a session for this user. Session closed when link ends. */
        if (pam_error == PAM_SUCCESS)
-          (void) pam_open_session (pamh, PAM_SILENT);
+          pam_open_session (pamh, PAM_SILENT);
     }
 
     *msg = MY_PAM_STRERROR (pam_error);
@@ -887,7 +887,7 @@ plogin(user, passwd, msg, msglen)
 /*
  * Clean up the mess
  */
-    (void) pam_end (pamh, pam_error);
+    pam_end (pamh, pam_error);
 
     if (pam_error != PAM_SUCCESS)
         return UPAP_AUTHNAK;
@@ -955,7 +955,7 @@ plogin(user, passwd, msg, msglen)
        return (UPAP_AUTHNAK);
 
     if (pw->pw_expire) {
-       (void)gettimeofday(&tp, (struct timezone *)NULL);
+       gettimeofday(&tp, (struct timezone *)NULL);
        if (tp.tv_sec >= pw->pw_expire) {
            syslog(LOG_INFO, "pap user %s account expired", user);
            return (UPAP_AUTHNAK);
@@ -983,21 +983,21 @@ plogin(user, passwd, msg, msglen)
            int fd;
 
            if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
-               (void)lseek(fd, (off_t)(pw->pw_uid * sizeof(ll)), SEEK_SET);
+               lseek(fd, (off_t)(pw->pw_uid * sizeof(ll)), SEEK_SET);
                memset((void *)&ll, 0, sizeof(ll));
-               (void)time(&ll.ll_time);
-               (void)strncpy(ll.ll_line, tty, sizeof(ll.ll_line));
-               (void)write(fd, (char *)&ll, sizeof(ll));
-               (void)close(fd);
+               time(&ll.ll_time);
+               strncpy(ll.ll_line, tty, sizeof(ll.ll_line));
+               write(fd, (char *)&ll, sizeof(ll));
+               close(fd);
            }
     }
 #endif
 
     memset((void *)&utmp, 0, sizeof(utmp));
-    (void)time(&utmp.ut_time);
-    (void)strncpy(utmp.ut_name, user, sizeof(utmp.ut_name));
-    (void)strncpy(utmp.ut_host, ":PPP", sizeof(utmp.ut_host));
-    (void)strncpy(utmp.ut_line, tty, sizeof(utmp.ut_line));
+    time(&utmp.ut_time);
+    strncpy(utmp.ut_name, user, sizeof(utmp.ut_name));
+    strncpy(utmp.ut_host, ":PPP", sizeof(utmp.ut_host));
+    strncpy(utmp.ut_line, tty, sizeof(utmp.ut_line));
     login(&utmp);              /* This logs us in wtmp too */
 
 #endif /* #ifdef USE_PAM */
@@ -1028,9 +1028,9 @@ plogout()
 
     pam_error = pam_start ("ppp", user, &pam_conversation, &pamh);
     if (pam_error == PAM_SUCCESS) {
-        (void) pam_set_item (pamh, PAM_TTY, devnam);
-        (void) pam_close_session (pamh, PAM_SILENT);
-       (void) pam_end (pamh, PAM_SUCCESS);
+        pam_set_item (pamh, PAM_TTY, devnam);
+        pam_close_session (pamh, PAM_SILENT);
+       pam_end (pamh, PAM_SUCCESS);
     }
 
 #else
index 3f82e63..85be3f1 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * $FreeBSD: src/usr.sbin/pppd/main.c,v 1.19.2.1 2002/07/30 03:50:40 peter Exp $
- * $DragonFly: src/usr.sbin/pppd/main.c,v 1.3 2003/11/03 19:31:40 eirikn Exp $
+ * $DragonFly: src/usr.sbin/pppd/main.c,v 1.4 2004/12/18 22:48:04 swildner Exp $
  */
 
 #include <stdio.h>
@@ -375,7 +375,7 @@ main(argc, argv)
        open_ppp_loopback();
 
        syslog(LOG_INFO, "Using interface ppp%d", ifunit);
-       (void) sprintf(ifname, "ppp%d", ifunit);
+       sprintf(ifname, "ppp%d", ifunit);
        script_setenv("IFNAME", ifname);
 
        create_pidfile();       /* write pid to file */
@@ -520,7 +520,7 @@ main(argc, argv)
        if (!demand) {
            
            syslog(LOG_INFO, "Using interface ppp%d", ifunit);
-           (void) sprintf(ifname, "ppp%d", ifunit);
+           sprintf(ifname, "ppp%d", ifunit);
            
            create_pidfile();   /* write pid to file */
 
@@ -530,10 +530,10 @@ main(argc, argv)
                            n++;
                            break;
                    }
-           (void) sprintf(iffilename, "%s%s.if", _PATH_VARRUN, &devnam[n]);
+           sprintf(iffilename, "%s%s.if", _PATH_VARRUN, &devnam[n]);
            if ((iffile = fopen(iffilename, "w")) != NULL) {
                fprintf(iffile, "ppp%d\n", ifunit);
-               (void) fclose(iffile);
+               fclose(iffile);
            } else {
                syslog(LOG_ERR, "Failed to create if file %s: %m", iffilename);
                iffilename[0] = 0;
@@ -669,10 +669,10 @@ create_pidfile()
 {
     FILE *pidfile;
 
-    (void) sprintf(pidfilename, "%s%s.pid", _PATH_VARRUN, ifname);
+    sprintf(pidfilename, "%s%s.pid", _PATH_VARRUN, ifname);
     if ((pidfile = fopen(pidfilename, "w")) != NULL) {
        fprintf(pidfile, "%d\n", pid);
-       (void) fclose(pidfile);
+       fclose(pidfile);
     } else {
        syslog(LOG_ERR, "Failed to create pid file %s: %m", pidfilename);
        pidfilename[0] = 0;
@@ -910,7 +910,7 @@ untimeout(func, arg)
     for (copp = &callout; (freep = *copp); copp = &freep->c_next)
        if (freep->c_func == func && freep->c_arg == arg) {
            *copp = freep->c_next;
-           (void) free((char *) freep);
+           free((char *) freep);
            break;
        }
 }
@@ -1181,9 +1181,9 @@ run_program(prog, args, must_exist)
        int new_fd;
 
        /* Leave the current location */
-       (void) setsid();    /* No controlling tty. */
-       (void) umask (S_IRWXG|S_IRWXO);
-       (void) chdir ("/"); /* no current directory. */
+       setsid();    /* No controlling tty. */
+       umask (S_IRWXG|S_IRWXO);
+       chdir ("/"); /* no current directory. */
        setuid(geteuid());
        setgid(getegid());