Remove not needed void casts.
authorEirik Nygaard <eirikn@dragonflybsd.org>
Sun, 7 Nov 2004 20:54:52 +0000 (20:54 +0000)
committerEirik Nygaard <eirikn@dragonflybsd.org>
Sun, 7 Nov 2004 20:54:52 +0000 (20:54 +0000)
Submitted by: Douwe Kiela <virtus@wanadoo.nl>

51 files changed:
bin/cp/cp.c
bin/csh/host.defs
bin/date/date.c
bin/date/netdate.c
bin/dd/conv.c
bin/dd/dd.c
bin/dd/misc.c
bin/df/df.c
bin/echo/echo.c
bin/ed/cbc.c
bin/ed/main.c
bin/expr/expr.y
bin/hostname/hostname.c
bin/kill/kill.c
bin/ln/ln.c
bin/ls/ls.c
bin/ls/print.c
bin/ls/util.c
bin/mkdir/mkdir.c
bin/mv/mv.c
bin/pax/ar_io.c
bin/pax/ar_subs.c
bin/pax/buf_subs.c
bin/pax/cache.c
bin/pax/cpio.c
bin/pax/file_subs.c
bin/pax/ftree.c
bin/pax/gen_subs.c
bin/pax/options.c
bin/pax/pat_rep.c
bin/pax/pax.c
bin/pax/sel_subs.c
bin/pax/tables.c
bin/pax/tty_subs.c
bin/pwd/pwd.c
bin/rcp/rcp.c
bin/rcp/util.c
bin/rm/rm.c
bin/rmdir/rmdir.c
bin/sh/bltin/bltin.h
bin/sh/input.c
bin/sh/main.c
bin/sh/mknodes.c
bin/sh/options.c
bin/sh/show.c
bin/sh/var.c
bin/sleep/sleep.c
bin/stty/gfmt.c
bin/stty/key.c
bin/stty/print.c
bin/stty/stty.c

index a6bc80b..2ce9653 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1988, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)cp.c    8.2 (Berkeley) 4/1/94
  * $FreeBSD: src/bin/cp/cp.c,v 1.24.2.7 2002/09/24 12:41:04 mckay Exp $
- * $DragonFly: src/bin/cp/cp.c,v 1.8 2004/08/25 01:23:15 dillon Exp $
+ * $DragonFly: src/bin/cp/cp.c,v 1.9 2004/11/07 20:54:51 eirikn Exp $
  */
 
 /*
@@ -315,7 +315,7 @@ copy(char **argv, enum op type, int fts_options)
                                badcp = rval = 1;
                                continue;
                        }
-                       (void)strncat(target_mid, p, nlen);
+                       strncat(target_mid, p, nlen);
                        to.p_end = target_mid + nlen;
                        *to.p_end = 0;
                        STRIP_TRAILING_SLASH(to);
@@ -363,7 +363,7 @@ copy(char **argv, enum op type, int fts_options)
                                    to.p_path, curr->fts_path);
                                badcp = rval = 1;
                                if (S_ISDIR(curr->fts_statp->st_mode))
-                                       (void)fts_set(ftsp, curr, FTS_SKIP);
+                                       fts_set(ftsp, curr, FTS_SKIP);
                                continue;
                        }
                        if (!S_ISDIR(curr->fts_statp->st_mode) &&
@@ -385,7 +385,7 @@ copy(char **argv, enum op type, int fts_options)
                        if (!Rflag && !rflag) {
                                warnx("%s is a directory (not copied).",
                                    curr->fts_path);
-                               (void)fts_set(ftsp, curr, FTS_SKIP);
+                               fts_set(ftsp, curr, FTS_SKIP);
                                badcp = rval = 1;
                                break;
                        }
@@ -437,7 +437,7 @@ copy(char **argv, enum op type, int fts_options)
                        break;
                }
                if (vflag && !badcp)
-                       (void)printf("%s -> %s\n", curr->fts_path, to.p_path);
+                       printf("%s -> %s\n", curr->fts_path, to.p_path);
        }
        if (errno)
                err(1, "fts_read");
index 379c5c4..a7b02fa 100644 (file)
@@ -1,7 +1,7 @@
 newcode        :
 /* $Header: /src/pub/tcsh/host.defs,v 1.31 2001/06/10 02:19:11 christos Exp $ */
 /* $FreeBSD: src/bin/csh/host.defs,v 1.1.2.2 2001/10/08 21:11:00 mp Exp $ */
-/* $DragonFly: src/bin/csh/host.defs,v 1.3 2004/01/26 18:12:54 drhodus Exp $ */
+/* $DragonFly: src/bin/csh/host.defs,v 1.4 2004/11/07 20:54:51 eirikn Exp $ */
 /*
  * host.defs: Hosttype/Machtype etc.
  */
@@ -140,28 +140,28 @@ getconvex()
 
 #ifdef SI_CPUTYPE_C2MP
     case SI_CPUTYPE_C2MP:
-       (void) strcpy(result, "c2X0");
+       strcpy(result, "c2X0");
        result[2] = sysinfo.cpu_count + '0';
        return result;
 #endif
 
 #ifdef SI_CPUTYPE_C34
     case SI_CPUTYPE_C34:
-       (void) strcpy(result, "c34X0");
+       strcpy(result, "c34X0");
        result[3] = sysinfo.cpu_count + '0';
        return result;
 #endif
 
 #ifdef SI_CPUTYPE_C38
     case SI_CPUTYPE_C38:
-       (void) strcpy(result, "c38X0");
+       strcpy(result, "c38X0");
        result[3] = sysinfo.cpu_count + '0';
        return result;
 #endif
 
 #ifdef SI_CPUTYPE_C46
     case SI_CPUTYPE_C46:
-       (void) strcpy(result, "c46X0");
+       strcpy(result, "c46X0");
        result[3] = sysinfo.cpu_count + '0';
        return result;
 #endif
index 99643cc..23f79a0 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1985, 1987, 1988, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)date.c  8.2 (Berkeley) 4/28/95
  * $FreeBSD: src/bin/date/date.c,v 1.32.2.6 2001/10/31 17:31:51 dillon Exp $
- * $DragonFly: src/bin/date/date.c,v 1.7 2004/10/30 13:34:49 liamfoy Exp $
+ * $DragonFly: src/bin/date/date.c,v 1.8 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -80,7 +80,7 @@ main(int argc, char **argv)
 
        v = NULL;
        fmt = NULL;
-       (void) setlocale(LC_TIME, "");
+       setlocale(LC_TIME, "");
        tz.tz_dsttime = tz.tz_minuteswest = 0;
        rflag = 0;
        jflag = nflag = 0;
@@ -116,7 +116,7 @@ main(int argc, char **argv)
                        set_timezone = 1;
                        break;
                case 'u':               /* do everything in UTC */
-                       (void)setenv("TZ", "UTC0", 1);
+                       setenv("TZ", "UTC0", 1);
                        break;
                case 'v':
                        v = vary_append(v, optarg);
@@ -163,8 +163,8 @@ main(int argc, char **argv)
                usage();
        }
        vary_destroy(v);
-       (void)strftime(buf, sizeof(buf), format, &lt);
-       (void)printf("%s\n", buf);
+       strftime(buf, sizeof(buf), format, &lt);
+       printf("%s\n", buf);
        exit(retval);
 }
 
@@ -290,7 +290,7 @@ badformat(void)
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n",
            "usage: date [-jnu] [-d dst] [-r seconds] [-t west] "
            "[-v[+|-]val[ymwdHMS]] ... ",
            "            "
index 6f41acf..13503f9 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)netdate.c       8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/date/netdate.c,v 1.11.2.1 2001/05/12 17:14:22 fenner Exp $
- * $DragonFly: src/bin/date/netdate.c,v 1.5 2004/09/26 16:29:49 asmodai Exp $
+ * $DragonFly: src/bin/date/netdate.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -113,7 +113,7 @@ netsettime(time_t tval)
                warn("gethostname");
                goto bad;
        }
-       (void)strncpy(msg.tsp_name, hostname, sizeof(msg.tsp_name) - 1);
+       strncpy(msg.tsp_name, hostname, sizeof(msg.tsp_name) - 1);
        msg.tsp_name[sizeof(msg.tsp_name) - 1] = '\0';
        msg.tsp_seq = htons((u_short)0);
        msg.tsp_time.tv_sec = htonl((u_long)tval);
@@ -164,7 +164,7 @@ loop:
                        waittime = WAITDATEACK;
                        goto loop;
                case TSP_DATEACK:
-                       (void)close(s);
+                       close(s);
                        return (0);
                default:
                        warnx("wrong ack received from timed: %s",
@@ -177,6 +177,6 @@ loop:
                warnx("can't reach time daemon, time set locally");
 
 bad:
-       (void)close(s);
+       close(s);
        return (retval = 2);
 }
index bebafb1..39aad47 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)conv.c  8.3 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/dd/conv.c,v 1.15 1999/09/13 21:47:10 green Exp $
- * $DragonFly: src/bin/dd/conv.c,v 1.4 2004/01/28 16:25:29 joerg Exp $
+ * $DragonFly: src/bin/dd/conv.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -146,7 +146,7 @@ block(void)
                 * input block.
                 */
                if (ch != '\n' && in.dbcnt < cbsz) {
-                       (void)memmove(in.db, in.dbp - in.dbcnt, in.dbcnt);
+                       memmove(in.db, in.dbp - in.dbcnt, in.dbcnt);
                        break;
                }
 
@@ -157,7 +157,7 @@ block(void)
 
                /* Pad short records with spaces. */
                if (cnt < cbsz)
-                       (void)memset(outp, ctab ? ctab[' '] : ' ', cbsz - cnt);
+                       memset(outp, ctab ? ctab[' '] : ' ', cbsz - cnt);
                else {
                        /*
                         * If the next character wouldn't have ended the
@@ -196,8 +196,8 @@ block_close(void)
         */
        if (in.dbcnt) {
                ++st.trunc;
-               (void)memmove(out.dbp, in.dbp - in.dbcnt, in.dbcnt);
-               (void)memset(out.dbp + in.dbcnt, ctab ? ctab[' '] : ' ',
+               memmove(out.dbp, in.dbp - in.dbcnt, in.dbcnt);
+               memset(out.dbp + in.dbcnt, ctab ? ctab[' '] : ' ',
                    cbsz - in.dbcnt);
                out.dbcnt += cbsz;
        }
@@ -233,7 +233,7 @@ unblock(void)
                        ;
                if (t >= inp) {
                        cnt = t - inp + 1;
-                       (void)memmove(out.dbp, inp, cnt);
+                       memmove(out.dbp, inp, cnt);
                        out.dbp += cnt;
                        out.dbcnt += cnt;
                }
@@ -242,7 +242,7 @@ unblock(void)
                        dd_out(0);
        }
        if (in.dbcnt)
-               (void)memmove(in.db, in.dbp - in.dbcnt, in.dbcnt);
+               memmove(in.db, in.dbp - in.dbcnt, in.dbcnt);
        in.dbp = in.db + in.dbcnt;
 }
 
@@ -258,7 +258,7 @@ unblock_close(void)
                        ;
                if (t >= in.db) {
                        cnt = t - in.db + 1;
-                       (void)memmove(out.dbp, in.db, cnt);
+                       memmove(out.dbp, in.db, cnt);
                        out.dbp += cnt;
                        out.dbcnt += cnt;
                }
index af5a689..5f798b0 100644 (file)
@@ -37,7 +37,7 @@
  * @(#) Copyright (c) 1991, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)dd.c    8.5 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/dd/dd.c,v 1.27.2.3 2001/08/01 01:37:35 obrien Exp $
- * $DragonFly: src/bin/dd/dd.c,v 1.4 2003/09/28 14:39:13 hmp Exp $
+ * $DragonFly: src/bin/dd/dd.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -79,12 +79,12 @@ const       u_char *ctab;           /* conversion table */
 int
 main(int argc __unused, char **argv)
 {
-       (void)setlocale(LC_CTYPE, "");
+       setlocale(LC_CTYPE, "");
        jcl(argv);
        setup();
 
-       (void)signal(SIGINFO, summaryx);
-       (void)signal(SIGINT, terminate);
+       signal(SIGINFO, summaryx);
+       signal(SIGINT, terminate);
 
        atexit(summary);
 
@@ -193,7 +193,7 @@ setup(void)
                ctab = casetab;
        }
 
-       (void)gettimeofday(&tv, (struct timezone *)NULL);
+       gettimeofday(&tv, (struct timezone *)NULL);
        st.start = tv.tv_sec + tv.tv_usec * 1e-6; 
 }
 
@@ -217,7 +217,7 @@ getfdtype(IO *io)
                                if (type & D_DISK) {
                                        const int one = 1;
 
-                                       (void)ioctl(io->fd, DIOCWLABEL, &one);
+                                       ioctl(io->fd, DIOCWLABEL, &one);
                                }
                                io->flags |= ISSEEK;
                        }
@@ -452,6 +452,6 @@ dd_out(int force)
 
        /* Reassemble the output block. */
        if (out.dbcnt)
-               (void)memmove(out.db, out.dbp - out.dbcnt, out.dbcnt);
+               memmove(out.db, out.dbp - out.dbcnt, out.dbcnt);
        out.dbp = out.db + out.dbcnt;
 }
index d116038..27272ef 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)misc.c  8.3 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/dd/misc.c,v 1.18.2.1 2001/08/01 01:40:03 obrien Exp $
- * $DragonFly: src/bin/dd/misc.c,v 1.4 2004/03/19 17:17:46 cpressey Exp $
+ * $DragonFly: src/bin/dd/misc.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -58,29 +58,29 @@ summary(void)
        double secs;
        char buf[100];
 
-       (void)gettimeofday(&tv, (struct timezone *)NULL);
+       gettimeofday(&tv, (struct timezone *)NULL);
        secs = tv.tv_sec + tv.tv_usec * 1e-6 - st.start;
        if (secs < 1e-6)
                secs = 1e-6;
        /* Use snprintf(3) so that we don't reenter stdio(3). */
-       (void)snprintf(buf, sizeof(buf),
+       snprintf(buf, sizeof(buf),
            "%llu+%llu records in\n%llu+%llu records out\n",
            st.in_full, st.in_part, st.out_full, st.out_part);
-       (void)write(STDERR_FILENO, buf, strlen(buf));
+       write(STDERR_FILENO, buf, strlen(buf));
        if (st.swab) {
-               (void)snprintf(buf, sizeof(buf), "%llu odd length swab %s\n",
+               snprintf(buf, sizeof(buf), "%llu odd length swab %s\n",
                     st.swab, (st.swab == 1) ? "block" : "blocks");
-               (void)write(STDERR_FILENO, buf, strlen(buf));
+               write(STDERR_FILENO, buf, strlen(buf));
        }
        if (st.trunc) {
-               (void)snprintf(buf, sizeof(buf), "%llu truncated %s\n",
+               snprintf(buf, sizeof(buf), "%llu truncated %s\n",
                     st.trunc, (st.trunc == 1) ? "block" : "blocks");
-               (void)write(STDERR_FILENO, buf, strlen(buf));
+               write(STDERR_FILENO, buf, strlen(buf));
        }
-       (void)snprintf(buf, sizeof(buf),
+       snprintf(buf, sizeof(buf),
            "%llu bytes transferred in %.6f secs (%.0f bytes/sec)\n",
            st.bytes, secs, st.bytes / secs);
-       (void)write(STDERR_FILENO, buf, strlen(buf));
+       write(STDERR_FILENO, buf, strlen(buf));
 }
 
 /* ARGSUSED */
index 4d32cd1..67f0e1f 100644 (file)
@@ -38,7 +38,7 @@
  * @(#) Copyright (c) 1980, 1990, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)df.c    8.9 (Berkeley) 5/8/95
  * $FreeBSD: src/bin/df/df.c,v 1.23.2.9 2002/07/01 00:14:24 iedowse Exp $
- * $DragonFly: src/bin/df/df.c,v 1.4 2003/09/28 14:39:14 hmp Exp $
+ * $DragonFly: src/bin/df/df.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/cdefs.h>
@@ -235,7 +235,7 @@ main(int argc, char **argv)
                                if (mount(fstype, mntpt, MNT_RDONLY,
                                    &mdev) != 0) {
                                        rv = ufs_df(*argv, &maxwidths) || rv;
-                                       (void)rmdir(mntpt);
+                                       rmdir(mntpt);
                                        free(mntpath);
                                        continue;
                                } else if (statfs(mntpt, &statfsbuf) == 0) {
@@ -245,8 +245,8 @@ main(int argc, char **argv)
                                        warn("%s", *argv);
                                        rv = 1;
                                }
-                               (void)unmount(mntpt, 0);
-                               (void)rmdir(mntpt);
+                               unmount(mntpt, 0);
+                               rmdir(mntpt);
                                free(mntpath);
                                continue;
                        }
@@ -303,7 +303,7 @@ regetmntinfo(struct statfs **mntbufp, long mntsize, char **vfslist)
                if (checkvfsname(mntbuf[i].f_fstypename, vfslist))
                        continue;
                if (!nflag)
-                       (void)statfs(mntbuf[i].f_mntonname,&mntbuf[j]);
+                       statfs(mntbuf[i].f_mntonname,&mntbuf[j]);
                else if (i != j)
                        mntbuf[j] = mntbuf[i];
                j++;
@@ -355,11 +355,11 @@ prthumanval(double bytes)
        unit = unit_adjust(&bytes);
 
        if (bytes == 0)
-               (void)printf("     0B");
+               printf("     0B");
        else if (bytes > 10)
-               (void)printf(" %5.0f%c", bytes, "BKMGTPE"[unit]);
+               printf(" %5.0f%c", bytes, "BKMGTPE"[unit]);
        else
-               (void)printf(" %5.1f%c", bytes, "BKMGTPE"[unit]);
+               printf(" %5.1f%c", bytes, "BKMGTPE"[unit]);
 }
 
 /*
@@ -393,40 +393,40 @@ prtstat(struct statfs *sfsp, struct maxwidths *mwp)
                mwp->used = imax(mwp->used, strlen("Used"));
                mwp->avail = imax(mwp->avail, strlen("Avail"));
 
-               (void)printf("%-*s %-*s %*s %*s Capacity", mwp->mntfrom,
+               printf("%-*s %-*s %*s %*s Capacity", mwp->mntfrom,
                    "Filesystem", mwp->total, header, mwp->used, "Used",
                    mwp->avail, "Avail");
                if (iflag) {
                        mwp->iused = imax(mwp->iused, strlen("  iused"));
                        mwp->ifree = imax(mwp->ifree, strlen("ifree"));
-                       (void)printf(" %*s %*s %%iused", mwp->iused - 2,
+                       printf(" %*s %*s %%iused", mwp->iused - 2,
                            "iused", mwp->ifree, "ifree");
                }
-               (void)printf("  Mounted on\n");
+               printf("  Mounted on\n");
        }
-       (void)printf("%-*s", mwp->mntfrom, sfsp->f_mntfromname);
+       printf("%-*s", mwp->mntfrom, sfsp->f_mntfromname);
        used = sfsp->f_blocks - sfsp->f_bfree;
        availblks = sfsp->f_bavail + used;
        if (hflag) {
                prthuman(sfsp, used);
        } else {
-               (void)printf(" %*ld %*ld %*ld", mwp->total,
+               printf(" %*ld %*ld %*ld", mwp->total,
                    fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize),
                    mwp->used, fsbtoblk(used, sfsp->f_bsize, blocksize),
                    mwp->avail, fsbtoblk(sfsp->f_bavail, sfsp->f_bsize,
                    blocksize));
        }
-       (void)printf(" %5.0f%%",
+       printf(" %5.0f%%",
            availblks == 0 ? 100.0 : (double)used / (double)availblks * 100.0);
        if (iflag) {
                inodes = sfsp->f_files;
                used = inodes - sfsp->f_ffree;
-               (void)printf(" %*ld %*ld %4.0f%% ", mwp->iused, used,
+               printf(" %*ld %*ld %4.0f%% ", mwp->iused, used,
                    mwp->ifree, sfsp->f_ffree, inodes == 0 ? 100.0 :
                    (double)used / (double)inodes * 100.0);
        } else
-               (void)printf("  ");
-       (void)printf("  %s\n", sfsp->f_mntonname);
+               printf("  ");
+       printf("  %s\n", sfsp->f_mntonname);
 }
 
 /*
@@ -503,7 +503,7 @@ ufs_df(char *file, struct maxwidths *mwp)
                return (1);
        }
        if (bread((off_t)SBOFF, &sblock, SBSIZE) == 0) {
-               (void)close(rfd);
+               close(rfd);
                return (1);
        }
        sfsp = &statfsbuf;
@@ -525,7 +525,7 @@ ufs_df(char *file, struct maxwidths *mwp)
        memmove(&sfsp->f_mntonname[0], mntpt, (size_t)MNAMELEN);
        memmove(&sfsp->f_mntfromname[0], file, (size_t)MNAMELEN);
        prtstat(sfsp, mwp);
-       (void)close(rfd);
+       close(rfd);
        return (0);
 }
 
@@ -534,11 +534,11 @@ bread(off_t off, void *buf, int cnt)
 {
        ssize_t nr;
 
-       (void)lseek(rfd, off, SEEK_SET);
+       lseek(rfd, off, SEEK_SET);
        if ((nr = read(rfd, buf, (size_t)cnt)) != (ssize_t)cnt) {
                /* Probably a dismounted disk if errno == EIO. */
                if (errno != EIO)
-                       (void)fprintf(stderr, "\ndf: %lld: %s\n",
+                       fprintf(stderr, "\ndf: %lld: %s\n",
                            (long long)off, strerror(nr > 0 ? EIO : errno));
                return (0);
        }
@@ -549,7 +549,7 @@ void
 usage(void)
 {
 
-       (void)fprintf(stderr,
+       fprintf(stderr,
            "usage: df [-b | -H | -h | -k | -m | -P] [-ailn] [-t type] [file | filesystem ...]\n");
        exit(EX_USAGE);
 }
index 79dd73b..85f686f 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1989, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)echo.c  8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/echo/echo.c,v 1.8.2.1 2001/08/01 02:33:32 obrien Exp $
- * $DragonFly: src/bin/echo/echo.c,v 1.5 2004/07/26 10:25:55 hmp Exp $
+ * $DragonFly: src/bin/echo/echo.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <stdio.h>
@@ -61,7 +61,7 @@ main(int argc __unused, char **argv)
                        argv[0][len - 2] = '\0';
                        nflag = 1;
                }
-               (void)printf("%s", argv[0]);
+               printf("%s", argv[0]);
                if (*++argv)
                        putchar(' ');
        }
index da83246..14b72c7 100644 (file)
@@ -38,7 +38,7 @@
  *
  * @(#)cbc.c,v 1.2 1994/02/01 00:34:36 alm Exp
  * $FreeBSD: src/bin/ed/cbc.c,v 1.12.2.1 2001/07/04 22:32:18 kris Exp $
- * $DragonFly: src/bin/ed/cbc.c,v 1.5 2004/10/30 13:34:49 liamfoy Exp $
+ * $DragonFly: src/bin/ed/cbc.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -201,7 +201,7 @@ get_keyword(void)
 void
 des_error(const char *s)
 {
-       (void)sprintf(errmsg, "%s", s ? s : strerror(errno));
+       sprintf(errmsg, "%s", s ? s : strerror(errno));
 }
 
 /*
@@ -286,7 +286,7 @@ expand_des_key(char *obuf, char *inbuf)
        /*
         * no special leader -- ASCII
         */
-       (void)strncpy(obuf, inbuf, 8);
+       strncpy(obuf, inbuf, 8);
 }
 
 /*****************
@@ -357,7 +357,7 @@ cbc_encode(char *msgbuf, int n, FILE *fp)
        /*
         *  Pad the last block randomly
         */
-       (void)MEMCPY(BUFFER(msgbuf + n), BUFFER(pvec), 8 - n);
+       MEMCPY(BUFFER(msgbuf + n), BUFFER(pvec), 8 - n);
        CHAR(msgbuf, 7) = n;
        for (n = 0; n < 8; n++)
                CHAR(msgbuf, n) ^= CHAR(ivec, n);
@@ -395,7 +395,7 @@ cbc_decode(char *msgbuf, FILE *fp)
                                return EOF;
                        }
                } else
-                       (void)ungetc(c, fp);
+                       ungetc(c, fp);
                return n;
        }
        if (n > 0)
index c54e01c..6eddc29 100644 (file)
@@ -28,7 +28,7 @@
  * @(#) Copyright (c) 1993 Andrew Moore, Talke Studio. All rights reserved.
  * @(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp
  * $FreeBSD: src/bin/ed/main.c,v 1.14.2.4 2001/08/01 02:36:03 obrien Exp $
- * $DragonFly: src/bin/ed/main.c,v 1.6 2004/09/26 16:32:47 asmodai Exp $
+ * $DragonFly: src/bin/ed/main.c,v 1.7 2004/11/07 20:54:51 eirikn Exp $
  */
 
 /*
@@ -107,7 +107,7 @@ main(int argc, char **argv)
        (void) &argv;
 #endif
 
-       (void)setlocale(LC_ALL, "");
+       setlocale(LC_ALL, "");
 
        red = (n = strlen(argv[0])) > 2 && argv[0][n - 3] == 'r';
 top:
index b26361a..b84b993 100644 (file)
@@ -5,7 +5,7 @@
  * Largely rewritten by J.T. Conklin (jtc@wimsey.com)
  *
  * $FreeBSD: src/bin/expr/expr.y,v 1.14.2.3 2001/08/01 02:37:46 obrien Exp $
- * $DragonFly: src/bin/expr/expr.y,v 1.4 2004/03/19 17:17:46 cpressey Exp $
+ * $DragonFly: src/bin/expr/expr.y,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -316,8 +316,8 @@ struct val *a, *b;
                to_string (b);  
                r = make_integer ((quad_t)(strcoll (a->u.s, b->u.s) == 0));
        } else {
-               (void)to_integer(a);
-               (void)to_integer(b);
+               to_integer(a);
+               to_integer(b);
                r = make_integer ((quad_t)(a->u.i == b->u.i));
        }
 
@@ -337,8 +337,8 @@ struct val *a, *b;
                to_string (b);
                r = make_integer ((quad_t)(strcoll (a->u.s, b->u.s) > 0));
        } else {
-               (void)to_integer(a);
-               (void)to_integer(b);
+               to_integer(a);
+               to_integer(b);
                r = make_integer ((quad_t)(a->u.i > b->u.i));
        }
 
@@ -358,8 +358,8 @@ struct val *a, *b;
                to_string (b);
                r = make_integer ((quad_t)(strcoll (a->u.s, b->u.s) < 0));
        } else {
-               (void)to_integer(a);
-               (void)to_integer(b);
+               to_integer(a);
+               to_integer(b);
                r = make_integer ((quad_t)(a->u.i < b->u.i));
        }
 
@@ -379,8 +379,8 @@ struct val *a, *b;
                to_string (b);
                r = make_integer ((quad_t)(strcoll (a->u.s, b->u.s) >= 0));
        } else {
-               (void)to_integer(a);
-               (void)to_integer(b);
+               to_integer(a);
+               to_integer(b);
                r = make_integer ((quad_t)(a->u.i >= b->u.i));
        }
 
@@ -400,8 +400,8 @@ struct val *a, *b;
                to_string (b);
                r = make_integer ((quad_t)(strcoll (a->u.s, b->u.s) <= 0));
        } else {
-               (void)to_integer(a);
-               (void)to_integer(b);
+               to_integer(a);
+               to_integer(b);
                r = make_integer ((quad_t)(a->u.i <= b->u.i));
        }
 
@@ -421,8 +421,8 @@ struct val *a, *b;
                to_string (b);
                r = make_integer ((quad_t)(strcoll (a->u.s, b->u.s) != 0));
        } else {
-               (void)to_integer(a);
-               (void)to_integer(b);
+               to_integer(a);
+               to_integer(b);
                r = make_integer ((quad_t)(a->u.i != b->u.i));
        }
 
index 1fa21c0..7fb4f17 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1988, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)hostname.c      8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/hostname/hostname.c,v 1.10.2.1 2001/08/01 02:40:23 obrien Exp $
- * $DragonFly: src/bin/hostname/hostname.c,v 1.11 2004/09/26 15:55:37 asmodai Exp $
+ * $DragonFly: src/bin/hostname/hostname.c,v 1.12 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -298,7 +298,7 @@ main(int argc, char **argv)
                        err(1, "gethostname");
                if (sflag && (p = strchr(hostname, '.')))
                        *p = '\0';
-               (void)printf("%s\n", hostname);
+               printf("%s\n", hostname);
        }
        exit(0);
 }
index 62212b7..9c75bba 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1988, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)kill.c  8.4 (Berkeley) 4/28/95
  * $FreeBSD: src/bin/kill/kill.c,v 1.11.2.2 2002/07/28 10:19:57 tjr Exp $
- * $DragonFly: src/bin/kill/kill.c,v 1.4 2004/10/18 18:43:37 eirikn Exp $
+ * $DragonFly: src/bin/kill/kill.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <ctype.h>
@@ -162,9 +162,9 @@ printsignals(FILE *fp)
        for (n = 1; n < sys_nsig; n++) {
                fprintf(fp, "%s", sys_signame[n]);
                if (n == (sys_nsig / 2) || n == (sys_nsig - 1))
-                       (void)fprintf(fp, "\n");
+                       fprintf(fp, "\n");
                else
-                       (void)fprintf(fp, " ");
+                       fprintf(fp, " ");
        }
 }
 
@@ -172,7 +172,7 @@ static void
 usage(void)
 {
 
-       (void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n%s\n%s\n",
                "usage: kill [-s signal_name] pid ...",
                "       kill -l [exit_status]",
                "       kill -signal_name pid ...",
index e9209f1..39b546c 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1987, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)ln.c    8.2 (Berkeley) 3/31/94
  * $FreeBSD: src/bin/ln/ln.c,v 1.15.2.4 2002/07/12 07:34:38 tjr Exp $
- * $DragonFly: src/bin/ln/ln.c,v 1.4 2004/08/30 19:27:21 eirikn Exp $
+ * $DragonFly: src/bin/ln/ln.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -223,14 +223,14 @@ linkit(const char *target, const char *source, int isdir)
                return (1);
        }
        if (vflag)
-               (void)printf("%s %c> %s\n", source, linkch, target);
+               printf("%s %c> %s\n", source, linkch, target);
        return (0);
 }
 
 void
 usage(void)
 {
-       (void)fprintf(stderr, "%s\n%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n%s\n",
            "usage: ln [-fhinsv] file1 file2",
            "       ln [-fhinsv] file ... directory",
            "       link file1 file2");
index c763215..0fbfa72 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1989, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)ls.c    8.5 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/ls/ls.c,v 1.32.2.8 2002/11/17 10:27:34 tjr Exp $
- * $DragonFly: src/bin/ls/ls.c,v 1.5 2004/07/22 11:52:33 asmodai Exp $
+ * $DragonFly: src/bin/ls/ls.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
        char *bp = tcapbuf;
 #endif
 
-       (void)setlocale(LC_ALL, "");
+       setlocale(LC_ALL, "");
 
        /* Terminal defaults to -Cq, non-terminal defaults to -1. */
        if (isatty(STDOUT_FILENO)) {
@@ -316,7 +316,7 @@ main(int argc, char *argv[])
                                f_color = 1;
                }
 #else
-               (void)fprintf(stderr, "Color support not compiled in.\n");
+               fprintf(stderr, "Color support not compiled in.\n");
 #endif /*COLORLS*/
 
 #ifdef COLORLS
@@ -327,8 +327,8 @@ main(int argc, char *argv[])
                 * for "stty oxtabs" mode.
                 */
                f_notabs = 1;
-               (void)signal(SIGINT, colorquit);
-               (void)signal(SIGQUIT, colorquit);
+               signal(SIGINT, colorquit);
+               signal(SIGQUIT, colorquit);
                parsecolors(getenv("LSCOLORS"));
        }
 #endif
@@ -365,7 +365,7 @@ main(int argc, char *argv[])
                if (f_kblocks)
                        blocksize = 2;
                else {
-                       (void)getbsize(&notused, &blocksize);
+                       getbsize(&notused, &blocksize);
                        blocksize /= 512;
                }
        }
@@ -469,7 +469,7 @@ traverse(int argc, char *argv[], int options)
                        display(p, chp);
 
                        if (!f_recursive && chp != NULL)
-                               (void)fts_set(ftsp, p, FTS_SKIP);
+                               fts_set(ftsp, p, FTS_SKIP);
                        break;
                default:
                        break;
@@ -639,9 +639,9 @@ display(FTSENT *p, FTSENT *list)
                        btotal += sp->st_blocks;
                        if (f_longform) {
                                if (f_numericonly) {
-                                       (void)snprintf(nuser, sizeof(nuser),
+                                       snprintf(nuser, sizeof(nuser),
                                            "%u", sp->st_uid);
-                                       (void)snprintf(ngroup, sizeof(ngroup),
+                                       snprintf(ngroup, sizeof(ngroup),
                                            "%u", sp->st_gid);
                                        user = nuser;
                                        group = ngroup;
@@ -672,9 +672,9 @@ display(FTSENT *p, FTSENT *list)
                                        err(1, NULL);
 
                                np->user = &np->data[0];
-                               (void)strcpy(np->user, user);
+                               strcpy(np->user, user);
                                np->group = &np->data[ulen + 1];
-                               (void)strcpy(np->group, group);
+                               strcpy(np->group, group);
 
                                if (S_ISCHR(sp->st_mode) ||
                                    S_ISBLK(sp->st_mode))
@@ -682,7 +682,7 @@ display(FTSENT *p, FTSENT *list)
 
                                if (f_flags) {
                                        np->flags = &np->data[ulen + glen + 2];
-                                       (void)strcpy(np->flags, flags);
+                                       strcpy(np->flags, flags);
                                        free(flags);
                                }
                                cur->fts_pointer = np;
@@ -700,15 +700,15 @@ display(FTSENT *p, FTSENT *list)
        if (needstats) {
                d.bcfile = bcfile;
                d.btotal = btotal;
-               (void)snprintf(buf, sizeof(buf), "%lu", maxblock);
+               snprintf(buf, sizeof(buf), "%lu", maxblock);
                d.s_block = strlen(buf);
                d.s_flags = maxflags;
                d.s_group = maxgroup;
-               (void)snprintf(buf, sizeof(buf), "%lu", maxinode);
+               snprintf(buf, sizeof(buf), "%lu", maxinode);
                d.s_inode = strlen(buf);
-               (void)snprintf(buf, sizeof(buf), "%lu", maxnlink);
+               snprintf(buf, sizeof(buf), "%lu", maxnlink);
                d.s_nlink = strlen(buf);
-               (void)snprintf(buf, sizeof(buf), "%llu", maxsize);
+               snprintf(buf, sizeof(buf), "%llu", maxsize);
                d.s_size = strlen(buf);
                d.s_user = maxuser;
        }
index f67f3be..e79ee5f 100644 (file)
@@ -35,7 +35,7 @@
  *
  * @(#)print.c 8.4 (Berkeley) 4/17/94
  * $FreeBSD: src/bin/ls/print.c,v 1.19.2.7 2002/11/17 10:27:34 tjr Exp $
- * $DragonFly: src/bin/ls/print.c,v 1.6 2004/09/26 15:53:25 asmodai Exp $
+ * $DragonFly: src/bin/ls/print.c,v 1.7 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -129,8 +129,8 @@ printscol(DISPLAY *dp)
        for (p = dp->list; p; p = p->fts_link) {
                if (IS_NOPRINT(p))
                        continue;
-               (void)printaname(p, dp->s_inode, dp->s_block);
-               (void)putchar('\n');
+               printaname(p, dp->s_inode, dp->s_block);
+               putchar('\n');
        }
 }
 
@@ -160,34 +160,34 @@ printlong(DISPLAY *dp)
 #endif
 
        if (dp->list->fts_level != FTS_ROOTLEVEL && (f_longform || f_size))
-               (void)printf("total %lu\n", howmany(dp->btotal, blocksize));
+               printf("total %lu\n", howmany(dp->btotal, blocksize));
 
        for (p = dp->list; p; p = p->fts_link) {
                if (IS_NOPRINT(p))
                        continue;
                sp = p->fts_statp;
                if (f_inode)
-                       (void)printf("%*lu ", dp->s_inode, (u_long)sp->st_ino);
+                       printf("%*lu ", dp->s_inode, (u_long)sp->st_ino);
                if (f_size)
-                       (void)printf("%*lld ",
+                       printf("%*lld ",
                            dp->s_block, howmany(sp->st_blocks, blocksize));
                strmode(sp->st_mode, buf);
                np = p->fts_pointer;
-               (void)printf("%s %*u %-*s  %-*s  ", buf, dp->s_nlink,
+               printf("%s %*u %-*s  %-*s  ", buf, dp->s_nlink,
                    sp->st_nlink, dp->s_user, np->user, dp->s_group,
                    np->group);
                if (f_flags)
-                       (void)printf("%-*s ", dp->s_flags, np->flags);
+                       printf("%-*s ", dp->s_flags, np->flags);
                if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode))
                        if (minor(sp->st_rdev) > 255 || minor(sp->st_rdev) < 0)
-                               (void)printf("%3d, 0x%08x ",
+                               printf("%3d, 0x%08x ",
                                    major(sp->st_rdev),
                                    (u_int)minor(sp->st_rdev));
                        else
-                               (void)printf("%3d, %3d ",
+                               printf("%3d, %3d ",
                                    major(sp->st_rdev), minor(sp->st_rdev));
                else if (dp->bcfile)
-                       (void)printf("%*s%*lld ",
+                       printf("%*s%*lld ",
                            8 - dp->s_size, "", dp->s_size, sp->st_size);
                else
                        printsize(dp->s_size, sp->st_size);
@@ -201,16 +201,16 @@ printlong(DISPLAY *dp)
                if (f_color)
                        color_printed = colortype(sp->st_mode);
 #endif
-               (void)printname(p->fts_name);
+               printname(p->fts_name);
 #ifdef COLORLS
                if (f_color && color_printed)
                        endcolor(0);
 #endif
                if (f_type)
-                       (void)printtype(sp->st_mode);
+                       printtype(sp->st_mode);
                if (S_ISLNK(sp->st_mode))
                        printlink(p);
-               (void)putchar('\n');
+               putchar('\n');
        }
 }
 
@@ -300,7 +300,7 @@ printcol(DISPLAY *dp)
                ++numrows;
 
        if (dp->list->fts_level != FTS_ROOTLEVEL && (f_longform || f_size))
-               (void)printf("total %lu\n", howmany(dp->btotal, blocksize));
+               printf("total %lu\n", howmany(dp->btotal, blocksize));
 
        /* counter if f_sortacross, else case-by-case */
        base = 0;
@@ -322,12 +322,12 @@ printcol(DISPLAY *dp)
                            <= endcol) {
                                if (f_sortacross && col + 1 >= numcols)
                                        break;
-                               (void)putchar(f_notabs ? ' ' : '\t');
+                               putchar(f_notabs ? ' ' : '\t');
                                chcnt = cnt;
                        }
                        endcol += colwidth;
                }
-               (void)putchar('\n');
+               putchar('\n');
        }
 }
 
@@ -398,7 +398,7 @@ printtype(u_int mode)
 
        if (f_slash) {
                if ((mode & S_IFMT) == S_IFDIR) {
-                       (void)putchar('/');
+                       putchar('/');
                        return (1);
                }
                return (0);
@@ -406,25 +406,25 @@ printtype(u_int mode)
 
        switch (mode & S_IFMT) {
        case S_IFDIR:
-               (void)putchar('/');
+               putchar('/');
                return (1);
        case S_IFIFO:
-               (void)putchar('|');
+               putchar('|');
                return (1);
        case S_IFLNK:
-               (void)putchar('@');
+               putchar('@');
                return (1);
        case S_IFSOCK:
-               (void)putchar('=');
+               putchar('=');
                return (1);
        case S_IFWHT:
-               (void)putchar('%');
+               putchar('%');
                return (1);
        default:
                break;
        }
        if (mode & (S_IXUSR | S_IXGRP | S_IXOTH)) {
-               (void)putchar('*');
+               putchar('*');
                return (1);
        }
        return (0);
@@ -434,7 +434,7 @@ printtype(u_int mode)
 static int
 putch(int c)
 {
-       (void)putchar(c);
+       putchar(c);
        return 0;
 }
 
@@ -443,7 +443,7 @@ writech(int c)
 {
        char tmp = c;
 
-       (void)write(STDOUT_FILENO, &tmp, 1);
+       write(STDOUT_FILENO, &tmp, 1);
        return 0;
 }
 
@@ -570,8 +570,8 @@ colorquit(int sig)
 {
        endcolor(sig);
 
-       (void)signal(sig, SIG_DFL);
-       (void)kill(getpid(), sig);
+       signal(sig, SIG_DFL);
+       kill(getpid(), sig);
 }
 
 #endif /* COLORLS */
@@ -584,17 +584,17 @@ printlink(FTSENT *p)
        char path[MAXPATHLEN + 1];
 
        if (p->fts_level == FTS_ROOTLEVEL)
-               (void)snprintf(name, sizeof(name), "%s", p->fts_name);
+               snprintf(name, sizeof(name), "%s", p->fts_name);
        else
-               (void)snprintf(name, sizeof(name),
+               snprintf(name, sizeof(name),
                    "%s/%s", p->fts_parent->fts_accpath, p->fts_name);
        if ((lnklen = readlink(name, path, sizeof(path) - 1)) == -1) {
-               (void)fprintf(stderr, "\nls: %s: %s\n", name, strerror(errno));
+               fprintf(stderr, "\nls: %s: %s\n", name, strerror(errno));
                return;
        }
        path[lnklen] = '\0';
-       (void)printf(" -> ");
-       (void)printname(path);
+       printf(" -> ");
+       printname(path);
 }
 
 static void
@@ -606,12 +606,12 @@ printsize(size_t width, off_t bytes)
                unit = unit_adjust(&bytes);
 
                if (bytes == 0)
-                       (void)printf("%*s ", width, "0B");
+                       printf("%*s ", width, "0B");
                else
-                       (void)printf("%*lld%c ", width - 1, bytes,
+                       printf("%*lld%c ", width - 1, bytes,
                            "BKMGTPE"[unit]);
        } else
-               (void)printf("%*lld ", width, bytes);
+               printf("%*lld ", width, bytes);
 }
 
 /*
index 7952d35..9ae8434 100644 (file)
@@ -35,7 +35,7 @@
  *
  * @(#)util.c  8.3 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/ls/util.c,v 1.20.2.5 2002/07/08 06:59:27 tjr Exp $
- * $DragonFly: src/bin/ls/util.c,v 1.3 2003/12/27 17:49:38 drhodus Exp $
+ * $DragonFly: src/bin/ls/util.c,v 1.4 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -150,7 +150,7 @@ prn_octal(const char *s)
 void
 usage(void)
 {
-       (void)fprintf(stderr,
+       fprintf(stderr,
 #ifdef COLORLS
        "usage: ls [-ABCFGHLPRTWabcdfghiklmnoqrstuwx1]"
 #else
index 17e29f6..9af416f 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1983, 1992, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)mkdir.c 8.2 (Berkeley) 1/25/94
  * $FreeBSD: src/bin/mkdir/mkdir.c,v 1.19.2.2 2001/08/01 04:42:37 obrien Exp $
- * $DragonFly: src/bin/mkdir/mkdir.c,v 1.5 2004/10/18 18:42:01 eirikn Exp $
+ * $DragonFly: src/bin/mkdir/mkdir.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -110,7 +110,7 @@ main(int argc, char **argv)
                                warn("%s", *argv);
                        success = 0;
                } else if (vflag)
-                       (void)printf("%s\n", *argv);
+                       printf("%s\n", *argv);
                
                if (!success)
                        exitval = 1;
@@ -165,11 +165,11 @@ build(char *path, mode_t omode)
                         */
                        oumask = umask(0);
                        numask = oumask & ~(S_IWUSR | S_IXUSR);
-                       (void)umask(numask);
+                       umask(numask);
                        first = 0;
                }
                if (last)
-                       (void)umask(oumask);
+                       umask(oumask);
                if (stat(path, &sb)) {
                        if (errno != ENOENT ||
                            mkdir(path, last ? omode : 
@@ -193,7 +193,7 @@ build(char *path, mode_t omode)
                    *p = '/';
        }
        if (!first && !last)
-               (void)umask(oumask);
+               umask(oumask);
        return (retval);
 }
 
@@ -201,6 +201,6 @@ static void
 usage(void)
 {
 
-       (void)fprintf(stderr, "usage: mkdir [-pv] [-m mode] directory ...\n");
+       fprintf(stderr, "usage: mkdir [-pv] [-m mode] directory ...\n");
        exit (EX_USAGE);
 }
index ce40758..16995c5 100644 (file)
@@ -32,7 +32,7 @@
  * @(#) Copyright (c) 1989, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)mv.c    8.2 (Berkeley) 4/2/94
  * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/bin/mv/mv.c,v 1.24.2.6 2004/03/24 08:34:36 pjd Exp $
- * $DragonFly: src/bin/mv/mv.c,v 1.7 2004/10/30 13:34:49 liamfoy Exp $
+ * $DragonFly: src/bin/mv/mv.c,v 1.8 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -109,7 +109,7 @@ main(int argc, char **argv)
        /* It's a directory, move each file into it. */
        if (strlen(argv[argc - 1]) > sizeof(path) - 1)
                errx(1, "%s: destination pathname too long", *argv);
-       (void)strcpy(path, argv[argc - 1]);
+       strcpy(path, argv[argc - 1]);
        baselen = strlen(path);
        endp = &path[baselen];
        if (!baselen || *(endp - 1) != '/') {
@@ -166,11 +166,11 @@ do_move(char *from, char *to)
                                printf("%s not overwritten\n", to);
                        return (0);
                } else if (iflg) {
-                       (void)fprintf(stderr, "overwrite %s? %s", to, YESNO);
+                       fprintf(stderr, "overwrite %s? %s", to, YESNO);
                        ask = 1;
                } else if (access(to, W_OK) && !stat(to, &sb)) {
                        strmode(sb.st_mode, modep);
-                       (void)fprintf(stderr, "override %s%s%s/%s for %s? %s",
+                       fprintf(stderr, "override %s%s%s/%s for %s? %s",
                            modep + 1, modep[9] == ' ' ? "" : " ",
                            user_from_uid((unsigned long)sb.st_uid, 0),
                            group_from_gid((unsigned long)sb.st_gid, 0), to, YESNO);
@@ -181,7 +181,7 @@ do_move(char *from, char *to)
                        while (ch != '\n' && ch != EOF)
                                ch = getchar();
                        if (first != 'y' && first != 'Y') {
-                               (void)fprintf(stderr, "not overwritten\n");
+                               fprintf(stderr, "not overwritten\n");
                                return (0);
                        }
                }
@@ -262,7 +262,7 @@ fastcopy(char *from, char *to, struct stat *sbp)
                if (errno == EEXIST && unlink(to) == 0)
                        continue;
                warn("%s", to);
-               (void)close(from_fd);
+               close(from_fd);
                return (1);
        }
        while ((nread = read(from_fd, bp, (size_t)blen)) > 0)
@@ -274,11 +274,11 @@ fastcopy(char *from, char *to, struct stat *sbp)
                warn("%s", from);
 err:           if (unlink(to))
                        warn("%s: remove", to);
-               (void)close(from_fd);
-               (void)close(to_fd);
+               close(from_fd);
+               close(to_fd);
                return (1);
        }
-       (void)close(from_fd);
+       close(from_fd);
 
        oldmode = sbp->st_mode & ALLPERMS;
        if (fchown(to_fd, sbp->st_uid, sbp->st_gid)) {
@@ -374,7 +374,7 @@ void
 usage(void)
 {
 
-       (void)fprintf(stderr, "%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n",
                      "usage: mv [-f | -i | -n] [-v] source target",
                      "       mv [-f | -i | -n] [-v] source ... directory");
        exit(EX_USAGE);
index c364d45..d853a0f 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)ar_io.c 8.2 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/pax/ar_io.c,v 1.12.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/ar_io.c,v 1.8 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/ar_io.c,v 1.9 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -100,7 +100,7 @@ ar_open(char *name)
        struct mtget mb;
 
        if (arfd != -1)
-               (void)close(arfd);
+               close(arfd);
        arfd = -1;
        can_unlnk = did_io = io_ok = invld_rec = 0;
        artyp = ISREG;
@@ -161,7 +161,7 @@ ar_open(char *name)
         */
        if (fstat(arfd, &arsb) < 0) {
                syswarn(0, errno, "Failed stat on %s", arcname);
-               (void)close(arfd);
+               close(arfd);
                arfd = -1;
                can_unlnk = 0;
                return(-1);
@@ -169,7 +169,7 @@ ar_open(char *name)
        if (S_ISDIR(arsb.st_mode)) {
                paxwarn(0, "Cannot write an archive on top of a directory %s",
                    arcname);
-               (void)close(arfd);
+               close(arfd);
                arfd = -1;
                can_unlnk = 0;
                return(-1);
@@ -314,11 +314,11 @@ ar_close(void)
         */
        if (vflag && (artyp == ISTAPE)) {
                if (vfpart)
-                       (void)putc('\n', listf);
-               (void)fprintf(listf,
+                       putc('\n', listf);
+               fprintf(listf,
                        "%s: Waiting for tape drive close to complete...",
                        argv0);
-               (void)fflush(listf);
+               fflush(listf);
        }
 
        /*
@@ -327,7 +327,7 @@ ar_close(void)
         */
        if (can_unlnk && (fstat(arfd, &arsb) == 0) && (S_ISREG(arsb.st_mode)) &&
            (arsb.st_size == 0)) {
-               (void)unlink(arcname);
+               unlink(arcname);
                can_unlnk = 0;
        }
 
@@ -338,16 +338,16 @@ ar_close(void)
        if ((act == LIST || act == EXTRACT) && nflag && zpid > 0)
                kill(zpid, SIGINT);
 
-       (void)close(arfd);
+       close(arfd);
 
        /* Do not exit before child to ensure data integrity */
        if (zpid > 0)
                waitpid(zpid, &status, 0);
 
        if (vflag && (artyp == ISTAPE)) {
-               (void)fputs("done.\n", listf);
+               fputs("done.\n", listf);
                vfpart = 0;
-               (void)fflush(listf);
+               fflush(listf);
        }
        arfd = -1;
 
@@ -373,7 +373,7 @@ ar_close(void)
         * Print out a summary of I/O for this archive volume.
         */
        if (vfpart) {
-               (void)putc('\n', listf);
+               putc('\n', listf);
                vfpart = 0;
        }
 
@@ -384,27 +384,27 @@ ar_close(void)
         */
        if (frmt == NULL) {
 #      ifdef NET2_STAT
-               (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
+               fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
 #      else
-               (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
+               fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
 #      endif
                    argv0, rdcnt);
-               (void)fflush(listf);
+               fflush(listf);
                flcnt = 0;
                return;
        }
 
        if (strcmp(NM_CPIO, argv0) == 0)
-               (void)fprintf(listf, "%qu blocks\n", (rdcnt ? rdcnt : wrcnt) / 5120);
+               fprintf(listf, "%qu blocks\n", (rdcnt ? rdcnt : wrcnt) / 5120);
        else if (strcmp(NM_TAR, argv0) != 0)
-               (void)fprintf(listf,
+               fprintf(listf,
 #      ifdef NET2_STAT
                    "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n",
 #      else
                    "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n",
 #      endif
                    argv0, frmt->name, arvol-1, flcnt, rdcnt, wrcnt);
-       (void)fflush(listf);
+       fflush(listf);
        flcnt = 0;
 }
 
@@ -1223,7 +1223,7 @@ ar_next(void)
                 */
                if (ar_open(buf) >= 0) {
                        if (freeit) {
-                               (void)free(arcname);
+                               free(arcname);
                                freeit = 0;
                        }
                        if ((arcname = strdup(buf)) == NULL) {
index 8855498..38eb290 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)ar_subs.c       8.2 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/pax/ar_subs.c,v 1.13.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/ar_subs.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/ar_subs.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -136,8 +136,8 @@ list(void)
         * all done, let format have a chance to cleanup, and make sure that
         * the patterns supplied by the user were all matched
         */
-       (void)(*frmt->end_rd)();
-       (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
+       (*frmt->end_rd)();
+       sigprocmask(SIG_BLOCK, &s_mask, NULL);
        ar_close();
        pat_chk();
 }
@@ -196,7 +196,7 @@ extract(void)
                         * file is not selected. skip past any file data and
                         * padding and go back for the next archive member
                         */
-                       (void)rd_skip(arcn->skip + arcn->pad);
+                       rd_skip(arcn->skip + arcn->pad);
                        continue;
                }
 
@@ -214,16 +214,16 @@ extract(void)
                        if (uflag && Dflag) {
                                if ((arcn->sb.st_mtime <= sb.st_mtime) &&
                                    (arcn->sb.st_ctime <= sb.st_ctime)) {
-                                       (void)rd_skip(arcn->skip + arcn->pad);
+                                       rd_skip(arcn->skip + arcn->pad);
                                        continue;
                                }
                        } else if (Dflag) {
                                if (arcn->sb.st_ctime <= sb.st_ctime) {
-                                       (void)rd_skip(arcn->skip + arcn->pad);
+                                       rd_skip(arcn->skip + arcn->pad);
                                        continue;
                                }
                        } else if (arcn->sb.st_mtime <= sb.st_mtime) {
-                               (void)rd_skip(arcn->skip + arcn->pad);
+                               rd_skip(arcn->skip + arcn->pad);
                                continue;
                        }
                }
@@ -238,7 +238,7 @@ extract(void)
                         * a bad name mod, skip and purge name from link table
                         */
                        purg_lnk(arcn);
-                       (void)rd_skip(arcn->skip + arcn->pad);
+                       rd_skip(arcn->skip + arcn->pad);
                        continue;
                }
 
@@ -250,16 +250,16 @@ extract(void)
                        if (Yflag && Zflag) {
                                if ((arcn->sb.st_mtime <= sb.st_mtime) &&
                                    (arcn->sb.st_ctime <= sb.st_ctime)) {
-                                       (void)rd_skip(arcn->skip + arcn->pad);
+                                       rd_skip(arcn->skip + arcn->pad);
                                        continue;
                                }
                        } else if (Yflag) {
                                if (arcn->sb.st_ctime <= sb.st_ctime) {
-                                       (void)rd_skip(arcn->skip + arcn->pad);
+                                       rd_skip(arcn->skip + arcn->pad);
                                        continue;
                                }
                        } else if (arcn->sb.st_mtime <= sb.st_mtime) {
-                               (void)rd_skip(arcn->skip + arcn->pad);
+                               rd_skip(arcn->skip + arcn->pad);
                                continue;
                        }
                }
@@ -268,7 +268,7 @@ extract(void)
                        if (vflag > 1)
                                ls_list(arcn, now, listf);
                        else {
-                               (void)fputs(arcn->name, listf);
+                               fputs(arcn->name, listf);
                                vfpart = 1;
                        }
                }
@@ -295,12 +295,12 @@ extract(void)
                        else
                                res = node_creat(arcn);
 
-                       (void)rd_skip(arcn->skip + arcn->pad);
+                       rd_skip(arcn->skip + arcn->pad);
                        if (res < 0)
                                purg_lnk(arcn);
 
                        if (vflag && vfpart) {
-                               (void)putc('\n', listf);
+                               putc('\n', listf);
                                vfpart = 0;
                        }
                        continue;
@@ -310,7 +310,7 @@ extract(void)
                 * over the data and purge the name from hard link table
                 */
                if ((fd = file_creat(arcn)) < 0) {
-                       (void)rd_skip(arcn->skip + arcn->pad);
+                       rd_skip(arcn->skip + arcn->pad);
                        purg_lnk(arcn);
                        continue;
                }
@@ -321,11 +321,11 @@ extract(void)
                res = (*frmt->rd_data)(arcn, fd, &cnt);
                file_close(arcn, fd);
                if (vflag && vfpart) {
-                       (void)putc('\n', listf);
+                       putc('\n', listf);
                        vfpart = 0;
                }
                if (!res)
-                       (void)rd_skip(cnt + arcn->pad);
+                       rd_skip(cnt + arcn->pad);
 
                /*
                 * if required, chdir around.
@@ -341,8 +341,8 @@ extract(void)
         * all patterns supplied by the user were matched; block off signals
         * to avoid chance for multiple entry into the cleanup code.
         */
-       (void)(*frmt->end_rd)();
-       (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
+       (*frmt->end_rd)();
+       sigprocmask(SIG_BLOCK, &s_mask, NULL);
        ar_close();
        proc_dir();
        pat_chk();
@@ -465,7 +465,7 @@ wr_archive(ARCHD *arcn, int is_app)
                        if (vflag > 1)
                                ls_list(arcn, now, listf);
                        else {
-                               (void)fputs(arcn->name, listf);
+                               fputs(arcn->name, listf);
                                vfpart = 1;
                        }
                }
@@ -486,7 +486,7 @@ wr_archive(ARCHD *arcn, int is_app)
                         * so we are done messing with this file
                         */
                        if (vflag && vfpart) {
-                               (void)putc('\n', listf);
+                               putc('\n', listf);
                                vfpart = 0;
                        }
                        rdfile_close(arcn, &fd);
@@ -504,7 +504,7 @@ wr_archive(ARCHD *arcn, int is_app)
                res = (*frmt->wr_data)(arcn, fd, &cnt);
                rdfile_close(arcn, &fd);
                if (vflag && vfpart) {
-                       (void)putc('\n', listf);
+                       putc('\n', listf);
                        vfpart = 0;
                }
                if (res < 0)
@@ -528,7 +528,7 @@ wr_archive(ARCHD *arcn, int is_app)
                (*frmt->end_wr)();
                wr_fin();
        }
-       (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
+       sigprocmask(SIG_BLOCK, &s_mask, NULL);
        ar_close();
        if (tflag)
                proc_dir();
@@ -616,7 +616,7 @@ append(void)
         * reading the archive may take a long time. If verbose tell the user
         */
        if (vflag) {
-               (void)fprintf(listf,
+               fprintf(listf,
                        "%s: Reading archive to position at the end...", argv0);
                vfpart = 1;
        }
@@ -678,7 +678,7 @@ append(void)
         * tell the user we are done reading.
         */
        if (vflag && vfpart) {
-               (void)fputs("done.\n", listf);
+               fputs("done.\n", listf);
                vfpart = 0;
        }
 
@@ -811,7 +811,7 @@ copy(void)
                                        arcn->name);
                                continue;
                        }
-                       (void)strncpy(dest_pt, arcn->name + res, drem);
+                       strncpy(dest_pt, arcn->name + res, drem);
                        dirbuf[PAXPATHLEN] = '\0';
 
                        /*
@@ -866,7 +866,7 @@ copy(void)
                }
 
                if (vflag) {
-                       (void)fputs(arcn->name, listf);
+                       fputs(arcn->name, listf);
                        vfpart = 1;
                }
                ++flcnt;
@@ -881,7 +881,7 @@ copy(void)
                        res = chk_same(arcn);
                if (res <= 0) {
                        if (vflag && vfpart) {
-                               (void)putc('\n', listf);
+                               putc('\n', listf);
                                vfpart = 0;
                        }
                        continue;
@@ -901,7 +901,7 @@ copy(void)
                        if (res < 0)
                                purg_lnk(arcn);
                        if (vflag && vfpart) {
-                               (void)putc('\n', listf);
+                               putc('\n', listf);
                                vfpart = 0;
                        }
                        continue;
@@ -931,7 +931,7 @@ copy(void)
                rdfile_close(arcn, &fdsrc);
 
                if (vflag && vfpart) {
-                       (void)putc('\n', listf);
+                       putc('\n', listf);
                        vfpart = 0;
                }
        }
@@ -941,7 +941,7 @@ copy(void)
         * patterns were selected block off signals to avoid chance for
         * multiple entry into the cleanup code.
         */
-       (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
+       sigprocmask(SIG_BLOCK, &s_mask, NULL);
        ar_close();
        proc_dir();
        ftree_chk();
index a3824e7..b49ba0d 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)buf_subs.c      8.2 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/pax/buf_subs.c,v 1.12.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/buf_subs.c,v 1.4 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/buf_subs.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -463,7 +463,7 @@ wr_fin(void)
        if (bufpt > buf) {
                memset(bufpt, 0, bufend - bufpt);
                bufpt = bufend;
-               (void)buf_flush(blksz);
+               buf_flush(blksz);
        }
 }
 
index 5357ad1..a33f3d1 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)cache.c 8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/pax/cache.c,v 1.12.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/cache.c,v 1.4 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/cache.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -211,9 +211,9 @@ name_uid(uid_t uid, int frc)
                ptr->uid = uid;
                ptr->valid = INVALID;
 #              ifdef NET2_STAT
-               (void)snprintf(ptr->name, sizeof(ptr->name), "%u", uid);
+               snprintf(ptr->name, sizeof(ptr->name), "%u", uid);
 #              else
-               (void)snprintf(ptr->name, sizeof(ptr->name), "%lu",
+               snprintf(ptr->name, sizeof(ptr->name), "%lu",
                               (unsigned long)uid);
 #              endif
                if (frc == 0)
@@ -225,7 +225,7 @@ name_uid(uid_t uid, int frc)
                if (ptr == NULL)
                        return(pw->pw_name);
                ptr->uid = uid;
-               (void)strncpy(ptr->name, pw->pw_name, UNMLEN - 1);
+               strncpy(ptr->name, pw->pw_name, UNMLEN - 1);
                ptr->name[UNMLEN-1] = '\0';
                ptr->valid = VALID;
        }
@@ -282,9 +282,9 @@ name_gid(gid_t gid, int frc)
                ptr->gid = gid;
                ptr->valid = INVALID;
 #              ifdef NET2_STAT
-               (void)snprintf(ptr->name, sizeof(ptr->name), "%u", gid);
+               snprintf(ptr->name, sizeof(ptr->name), "%u", gid);
 #              else
-               (void)snprintf(ptr->name, sizeof(ptr->name), "%lu",
+               snprintf(ptr->name, sizeof(ptr->name), "%lu",
                               (unsigned long)gid);
 #              endif
                if (frc == 0)
@@ -296,7 +296,7 @@ name_gid(gid_t gid, int frc)
                if (ptr == NULL)
                        return(gr->gr_name);
                ptr->gid = gid;
-               (void)strncpy(ptr->name, gr->gr_name, GNMLEN - 1);
+               strncpy(ptr->name, gr->gr_name, GNMLEN - 1);
                ptr->name[GNMLEN-1] = '\0';
                ptr->valid = VALID;
        }
@@ -356,7 +356,7 @@ uid_name(char *name, uid_t *uid)
                *uid = pw->pw_uid;
                return(0);
        }
-       (void)strncpy(ptr->name, name, UNMLEN - 1);
+       strncpy(ptr->name, name, UNMLEN - 1);
        ptr->name[UNMLEN-1] = '\0';
        if ((pw = getpwnam(name)) == NULL) {
                ptr->valid = INVALID;
@@ -420,7 +420,7 @@ gid_name(char *name, gid_t *gid)
                return(0);
        }
 
-       (void)strncpy(ptr->name, name, GNMLEN - 1);
+       strncpy(ptr->name, name, GNMLEN - 1);
        ptr->name[GNMLEN-1] = '\0';
        if ((gr = getgrnam(name)) == NULL) {
                ptr->valid = INVALID;
index e0e34a5..97b4e05 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)cpio.c  8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/pax/cpio.c,v 1.12.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/cpio.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/cpio.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -166,7 +166,7 @@ cpio_endwr(void)
        last.nlen = sizeof(TRAILER) - 1;
        last.type = PAX_REG;
        last.sb.st_nlink = 1;
-       (void)strcpy(last.name, TRAILER);
+       strcpy(last.name, TRAILER);
        return((*frmt->wr)(&last));
 }
 
index 83a2305..6e12a85 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)file_subs.c     8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/pax/file_subs.c,v 1.12.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/file_subs.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/file_subs.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -605,7 +605,7 @@ chk_path( char *name, uid_t st_uid, gid_t st_gid)
                 */
                retval = 0;
                if (pids)
-                       (void)set_ids(name, st_uid, st_gid);
+                       set_ids(name, st_uid, st_gid);
 
                /*
                 * make sure the user doen't have some strange umask that
@@ -898,7 +898,7 @@ rdfile_close(ARCHD *arcn, int *fd)
        if (*fd < 0)
                return;
 
-       (void)close(*fd);
+       close(*fd);
        *fd = -1;
        if (!tflag)
                return;
index 397a607..f4b4dde 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)ftree.c 8.2 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/pax/ftree.c,v 1.13.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/ftree.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/ftree.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -210,7 +210,7 @@ ftree_sel(ARCHD *arcn)
                return;
 
        if (ftent != NULL)
-               (void)fts_set(ftsp, ftent, FTS_SKIP);
+               fts_set(ftsp, ftent, FTS_SKIP);
 }
 
 /*
@@ -242,7 +242,7 @@ ftree_chk(void)
                        paxwarn(1,"WARNING! These file names were not selected:");
                        ++wban;
                }
-               (void)fprintf(stderr, "%s\n", ft->fname);
+               fprintf(stderr, "%s\n", ft->fname);
        }
 }
 
@@ -265,7 +265,7 @@ ftree_arg(void)
         * close off the current file tree
         */
        if (ftsp != NULL) {
-               (void)fts_close(ftsp);
+               fts_close(ftsp);
                ftsp = NULL;
        }
 
index c96f147..71190ba 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)gen_subs.c      8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/pax/gen_subs.c,v 1.12.2.4 2002/03/12 17:49:17 phantom Exp $
- * $DragonFly: src/bin/pax/gen_subs.c,v 1.4 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/gen_subs.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -89,8 +89,8 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
         * if not verbose, just print the file name
         */
        if (!vflag) {
-               (void)fprintf(fp, "%s\n", arcn->name);
-               (void)fflush(fp);
+               fprintf(fp, "%s\n", arcn->name);
+               fflush(fp);
                return;
        }
 
@@ -115,7 +115,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
         */
        if (strftime(f_date,DATELEN,timefrmt,localtime(&(sbp->st_mtime))) == 0)
                f_date[0] = '\0';
-       (void)fprintf(fp, "%s%2u %-*s %-*s ", f_mode, sbp->st_nlink,
+       fprintf(fp, "%s%2u %-*s %-*s ", f_mode, sbp->st_nlink,
                UT_NAMESIZE, name_uid(sbp->st_uid, 1), UT_GRPSIZE,
                name_gid(sbp->st_gid, 1));
 
@@ -124,31 +124,31 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
         */
        if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK))
 #              ifdef NET2_STAT
-               (void)fprintf(fp, "%4u,%4u ", MAJOR(sbp->st_rdev),
+               fprintf(fp, "%4u,%4u ", MAJOR(sbp->st_rdev),
                    MINOR(sbp->st_rdev));
 #              else
-               (void)fprintf(fp, "%4lu,%4lu ", (unsigned long)MAJOR(sbp->st_rdev),
+               fprintf(fp, "%4lu,%4lu ", (unsigned long)MAJOR(sbp->st_rdev),
                    (unsigned long)MINOR(sbp->st_rdev));
 #              endif
        else {
 #              ifdef NET2_STAT
-               (void)fprintf(fp, "%9lu ", sbp->st_size);
+               fprintf(fp, "%9lu ", sbp->st_size);
 #              else
-               (void)fprintf(fp, "%9qu ", sbp->st_size);
+               fprintf(fp, "%9qu ", sbp->st_size);
 #              endif
        }
 
        /*
         * print name and link info for hard and soft links
         */
-       (void)fprintf(fp, "%s %s", f_date, arcn->name);
+       fprintf(fp, "%s %s", f_date, arcn->name);
        if ((arcn->type == PAX_HLK) || (arcn->type == PAX_HRG))
-               (void)fprintf(fp, " == %s\n", arcn->ln_name);
+               fprintf(fp, " == %s\n", arcn->ln_name);
        else if (arcn->type == PAX_SLK)
-               (void)fprintf(fp, " => %s\n", arcn->ln_name);
+               fprintf(fp, " => %s\n", arcn->ln_name);
        else
-               (void)putc('\n', fp);
-       (void)fflush(fp);
+               putc('\n', fp);
+       fflush(fp);
        return;
 }
 
index 5c47169..d0d857a 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)options.c       8.2 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/pax/options.c,v 1.13.2.3 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/options.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/options.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -365,10 +365,10 @@ pax_options(int argc, char **argv)
                                break;
                        }
                        paxwarn(1, "Unknown -x format: %s", optarg);
-                       (void)fputs("pax: Known -x formats are:", stderr);
+                       fputs("pax: Known -x formats are:", stderr);
                        for (i = 0; i < (sizeof(fsub)/sizeof(FSUB)); ++i)
-                               (void)fprintf(stderr, " %s", fsub[i].name);
-                       (void)fputs("\n\n", stderr);
+                               fprintf(stderr, " %s", fsub[i].name);
+                       fputs("\n\n", stderr);
                        pax_usage();
                        break;
                case 'z':
@@ -1178,10 +1178,10 @@ cpio_options(int argc, char **argv)
                                    sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt)) != NULL)
                                        break;
                                paxwarn(1, "Unknown -H format: %s", optarg);
-                               (void)fputs("cpio: Known -H formats are:", stderr);
+                               fputs("cpio: Known -H formats are:", stderr);
                                for (i = 0; i < (sizeof(fsub)/sizeof(FSUB)); ++i)
-                                       (void)fprintf(stderr, " %s", fsub[i].name);
-                               (void)fputs("\n\n", stderr);
+                                       fprintf(stderr, " %s", fsub[i].name);
+                               fputs("\n\n", stderr);
                                cpio_usage();
                                break;
                        case 'L':
@@ -1269,13 +1269,13 @@ printflg(unsigned int flg)
        int nxt;
        int pos = 0;
 
-       (void)fprintf(stderr,"%s: Invalid combination of options:", argv0);
+       fprintf(stderr,"%s: Invalid combination of options:", argv0);
        while ((nxt = ffs(flg)) != 0) {
                flg = flg >> nxt;
                pos += nxt;
-               (void)fprintf(stderr, " -%c", flgch[pos-1]);
+               fprintf(stderr, " -%c", flgch[pos-1]);
        }
-       (void)putc('\n', stderr);
+       putc('\n', stderr);
 }
 
 /*
@@ -1326,7 +1326,7 @@ bad_opt(void)
         */
        paxwarn(1,"These format options are not supported");
        while ((opt = opt_next()) != NULL)
-               (void)fprintf(stderr, "\t%s = %s\n", opt->name, opt->value);
+               fprintf(stderr, "\t%s = %s\n", opt->name, opt->value);
        pax_usage();
        return(0);
 }
@@ -1515,29 +1515,29 @@ no_op(void)
 void
 pax_usage(void)
 {
-       (void)fputs("usage: pax [-cdnvz] [-E limit] [-f archive] ", stderr);
-       (void)fputs("[-s replstr] ... [-U user] ...", stderr);
-       (void)fputs("\n    [-G group] ... ", stderr);
-       (void)fputs("[-T [from_date][,to_date]] ... ", stderr);
-       (void)fputs("[pattern ...]\n", stderr);
-       (void)fputs("       pax -r [-cdiknuvzDYZ] [-E limit] ", stderr);
-       (void)fputs("[-f archive] [-o options] ... \n", stderr);
-       (void)fputs("      [-p string] ... [-s replstr] ... ", stderr);
-       (void)fputs("[-U user] ... [-G group] ...\n        ", stderr);
-       (void)fputs("[-T [from_date][,to_date]] ... ", stderr);
-       (void)fputs(" [pattern ...]\n", stderr);
-       (void)fputs("       pax -w [-dituvzHLPX] [-b blocksize] ", stderr);
-       (void)fputs("[ [-a] [-f archive] ] [-x format] \n", stderr);
-       (void)fputs("      [-B bytes] [-s replstr] ... ", stderr);
-       (void)fputs("[-o options] ... [-U user] ...", stderr);
-       (void)fputs("\n    [-G group] ... ", stderr);
-       (void)fputs("[-T [from_date][,to_date][/[c][m]]] ... ", stderr);
-       (void)fputs("[file ...]\n", stderr);
-       (void)fputs("       pax -r -w [-diklntuvDHLPXYZ] ", stderr);
-       (void)fputs("[-p string] ... [-s replstr] ...", stderr);
-       (void)fputs("\n    [-U user] ... [-G group] ... ", stderr);
-       (void)fputs("[-T [from_date][,to_date][/[c][m]]] ... ", stderr);
-       (void)fputs("\n    [file ...] directory\n", stderr);
+       fputs("usage: pax [-cdnvz] [-E limit] [-f archive] ", stderr);
+       fputs("[-s replstr] ... [-U user] ...", stderr);
+       fputs("\n          [-G group] ... ", stderr);
+       fputs("[-T [from_date][,to_date]] ... ", stderr);
+       fputs("[pattern ...]\n", stderr);
+       fputs("       pax -r [-cdiknuvzDYZ] [-E limit] ", stderr);
+       fputs("[-f archive] [-o options] ... \n", stderr);
+       fputs("    [-p string] ... [-s replstr] ... ", stderr);
+       fputs("[-U user] ... [-G group] ...\n      ", stderr);
+       fputs("[-T [from_date][,to_date]] ... ", stderr);
+       fputs(" [pattern ...]\n", stderr);
+       fputs("       pax -w [-dituvzHLPX] [-b blocksize] ", stderr);
+       fputs("[ [-a] [-f archive] ] [-x format] \n", stderr);
+       fputs("    [-B bytes] [-s replstr] ... ", stderr);
+       fputs("[-o options] ... [-U user] ...", stderr);
+       fputs("\n          [-G group] ... ", stderr);
+       fputs("[-T [from_date][,to_date][/[c][m]]] ... ", stderr);
+       fputs("[file ...]\n", stderr);
+       fputs("       pax -r -w [-diklntuvDHLPXYZ] ", stderr);
+       fputs("[-p string] ... [-s replstr] ...", stderr);
+       fputs("\n          [-U user] ... [-G group] ... ", stderr);
+       fputs("[-T [from_date][,to_date][/[c][m]]] ... ", stderr);
+       fputs("\n          [file ...] directory\n", stderr);
        exit(1);
 }
 
@@ -1549,9 +1549,9 @@ pax_usage(void)
 void
 tar_usage(void)
 {
-       (void)fputs("usage: tar [-]{crtux}[-befhjmopqsvwyzHLOPXZ014578] [blocksize] ",
+       fputs("usage: tar [-]{crtux}[-befhjmopqsvwyzHLOPXZ014578] [blocksize] ",
                 stderr);
-       (void)fputs("[archive] [replstr] [-C directory] [-I file] [file ...]\n",
+       fputs("[archive] [replstr] [-C directory] [-I file] [file ...]\n",
            stderr);
        exit(1);
 }
@@ -1564,10 +1564,10 @@ tar_usage(void)
 void
 cpio_usage(void)
 {
-       (void)fputs("usage: cpio -o [-aABcLvVzZ] [-C bytes] [-H format] [-O archive]\n", stderr);
-       (void)fputs("               [-F archive] < name-list [> archive]\n", stderr);
-       (void)fputs("       cpio -i [-bBcdfmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]\n", stderr);
-       (void)fputs("               [-I archive] [-F archive] [pattern...] [< archive]\n", stderr);
-       (void)fputs("       cpio -p [-adlLmuvV] destination-directory < name-list\n", stderr);
+       fputs("usage: cpio -o [-aABcLvVzZ] [-C bytes] [-H format] [-O archive]\n", stderr);
+       fputs("               [-F archive] < name-list [> archive]\n", stderr);
+       fputs("       cpio -i [-bBcdfmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]\n", stderr);
+       fputs("               [-I archive] [-F archive] [pattern...] [< archive]\n", stderr);
+       fputs("       cpio -p [-adlLmuvV] destination-directory < name-list\n", stderr);
        exit(1);
 }
index 4f57f42..675d6b0 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)pat_rep.c       8.2 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/pax/pat_rep.c,v 1.15.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/pat_rep.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/pat_rep.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -140,7 +140,7 @@ rep_add(char *str)
                regerror(res, &(rep->rcmp), rebuf, sizeof(rebuf));
                paxwarn(1, "%s while compiling regular expression %s", rebuf, str);
 #      endif
-               (void)free((char *)rep);
+               free((char *)rep);
                return(-1);
        }
 
@@ -152,11 +152,11 @@ rep_add(char *str)
        *pt1++ = *str;
        if ((pt2 = strchr(pt1, *str)) == NULL) {
 #              ifdef NET2_REGEX
-               (void)free((char *)rep->rcmp);
+               free((char *)rep->rcmp);
 #              else
                regfree(&(rep->rcmp));
 #              endif
-               (void)free((char *)rep);
+               free((char *)rep);
                paxwarn(1, "Invalid replacement string %s", str);
                return(-1);
        }
@@ -181,11 +181,11 @@ rep_add(char *str)
                        break;
                default:
 #                      ifdef NET2_REGEX
-                       (void)free((char *)rep->rcmp);
+                       free((char *)rep->rcmp);
 #                      else
                        regfree(&(rep->rcmp));
 #                      endif
-                       (void)free((char *)rep);
+                       free((char *)rep);
                        *pt1 = *str;
                        paxwarn(1, "Invalid replacement string option %s", str);
                        return(-1);
@@ -279,7 +279,7 @@ pat_chk(void)
                        paxwarn(1, "WARNING! These patterns were not matched:");
                        ++wban;
                }
-               (void)fprintf(stderr, "%s\n", pt->pstr);
+               fprintf(stderr, "%s\n", pt->pstr);
        }
 }
 
@@ -401,7 +401,7 @@ pat_sel(ARCHD *arcn)
                return(-1);
        }
        *ppt = pt->fow;
-       (void)free((char *)pt);
+       free((char *)pt);
        arcn->pat = NULL;
        return(0);
 }
@@ -619,7 +619,7 @@ mod_name(ARCHD *arcn)
                if (arcn->name[1] == '\0') {
                        arcn->name[0] = '.';
                } else {
-                       (void)memmove(arcn->name, &arcn->name[1],
+                       memmove(arcn->name, &arcn->name[1],
                            strlen(arcn->name));
                        arcn->nlen--;
                }
@@ -633,7 +633,7 @@ mod_name(ARCHD *arcn)
                if (arcn->ln_name[1] == '\0') {
                        arcn->ln_name[0] = '.';
                } else {
-                       (void)memmove(arcn->ln_name, &arcn->ln_name[1],
+                       memmove(arcn->ln_name, &arcn->ln_name[1],
                            strlen(arcn->ln_name));
                        arcn->ln_nlen--;
                }
@@ -880,7 +880,7 @@ rep_name(char *name, int *nlen, int prnt)
         * (the user already saw that substitution go by)
         */
        pt = rephead;
-       (void)strcpy(buf1, name);
+       strcpy(buf1, name);
        inpt = buf1;
        outpt = nname;
        endpt = outpt + PAXPATHLEN;
@@ -994,10 +994,10 @@ rep_name(char *name, int *nlen, int prnt)
                 */
                if (prnt && (pt->flgs & PRNT)) {
                        if (*nname == '\0')
-                               (void)fprintf(stderr,"%s >> <empty string>\n",
+                               fprintf(stderr,"%s >> <empty string>\n",
                                    name);
                        else
-                               (void)fprintf(stderr,"%s >> %s\n", name, nname);
+                               fprintf(stderr,"%s >> %s\n", name, nname);
                }
 
                /*
index f72d71b..a3d6d22 100644 (file)
@@ -37,7 +37,7 @@
  * @(#) Copyright (c) 1992, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)pax.c   8.2 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/pax/pax.c,v 1.13.2.4 2002/11/07 15:29:53 imp Exp $
- * $DragonFly: src/bin/pax/pax.c,v 1.4 2003/09/28 14:39:14 hmp Exp $
+ * $DragonFly: src/bin/pax/pax.c,v 1.5 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -225,7 +225,7 @@ main(int argc, char **argv)
        char *tmpdir;
        size_t tdlen;
 
-       (void) setlocale(LC_ALL, "");
+       setlocale(LC_ALL, "");
        listf = stderr;
        /*
         * Keep a reference to cwd, so we can always come back home.
@@ -336,7 +336,7 @@ gen_init(void)
         */
        if (getrlimit(RLIMIT_DATA , &reslimit) == 0){
                reslimit.rlim_cur = reslimit.rlim_max;
-               (void)setrlimit(RLIMIT_DATA , &reslimit);
+               setrlimit(RLIMIT_DATA , &reslimit);
        }
 
        /*
@@ -345,7 +345,7 @@ gen_init(void)
         */
        if (getrlimit(RLIMIT_FSIZE , &reslimit) == 0){
                reslimit.rlim_cur = reslimit.rlim_max;
-               (void)setrlimit(RLIMIT_FSIZE , &reslimit);
+               setrlimit(RLIMIT_FSIZE , &reslimit);
        }
 
        /*
@@ -353,7 +353,7 @@ gen_init(void)
         */
        if (getrlimit(RLIMIT_STACK , &reslimit) == 0){
                reslimit.rlim_cur = reslimit.rlim_max;
-               (void)setrlimit(RLIMIT_STACK , &reslimit);
+               setrlimit(RLIMIT_STACK , &reslimit);
        }
 
        /*
@@ -361,7 +361,7 @@ gen_init(void)
         */
        if (getrlimit(RLIMIT_RSS , &reslimit) == 0){
                reslimit.rlim_cur = reslimit.rlim_max;
-               (void)setrlimit(RLIMIT_RSS , &reslimit);
+               setrlimit(RLIMIT_RSS , &reslimit);
        }
 
        /*
index b7d9001..7c12c62 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)sel_subs.c      8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/pax/sel_subs.c,v 1.11.2.1 2001/08/01 05:03:11 obrien Exp $
- * $DragonFly: src/bin/pax/sel_subs.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/sel_subs.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -412,7 +412,7 @@ trng_add(char *str)
                 */
                if (str_sec(str, &(pt->low_time)) < 0) {
                        paxwarn(1, "Illegal lower time range %s", str);
-                       (void)free((char *)pt);
+                       free((char *)pt);
                        goto out;
                }
                pt->flgs |= HASLOW;
@@ -424,7 +424,7 @@ trng_add(char *str)
                 */
                if (str_sec(up_pt, &(pt->high_time)) < 0) {
                        paxwarn(1, "Illegal upper time range %s", up_pt);
-                       (void)free((char *)pt);
+                       free((char *)pt);
                        goto out;
                }
                pt->flgs |= HASHIGH;
@@ -436,7 +436,7 @@ trng_add(char *str)
                        if (pt->low_time > pt->high_time) {
                                paxwarn(1, "Upper %s and lower %s time overlap",
                                        up_pt, str);
-                               (void)free((char *)pt);
+                               free((char *)pt);
                                return(-1);
                        }
                }
index 95aad3d..6e045a3 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)tables.c        8.1 (Berkeley) 5/31/93
  * $FreeBSD: src/bin/pax/tables.c,v 1.13.2.1 2001/08/01 05:03:12 obrien Exp $
- * $DragonFly: src/bin/pax/tables.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/tables.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -178,8 +178,8 @@ chk_lnk(ARCHD *arcn)
                         */
                        if (--pt->nlink <= 1) {
                                *ppt = pt->fow;
-                               (void)free((char *)pt->name);
-                               (void)free((char *)pt);
+                               free((char *)pt->name);
+                               free((char *)pt);
                        }
                        return(1);
                }
@@ -198,7 +198,7 @@ chk_lnk(ARCHD *arcn)
                        ltab[indx] = pt;
                        return(0);
                }
-               (void)free((char *)pt);
+               free((char *)pt);
        }
 
        paxwarn(1, "Hard link table out of memory");
@@ -254,8 +254,8 @@ purg_lnk(ARCHD *arcn)
         * remove and free it
         */
        *ppt = pt->fow;
-       (void)free((char *)pt->name);
-       (void)free((char *)pt);
+       free((char *)pt->name);
+       free((char *)pt);
 }
 
 /*
@@ -288,8 +288,8 @@ lnk_end(void)
                while (pt != NULL) {
                        ppt = pt;
                        pt = ppt->fow;
-                       (void)free((char *)ppt->name);
-                       (void)free((char *)ppt);
+                       free((char *)ppt->name);
+                       free((char *)ppt);
                }
        }
        return;
@@ -347,7 +347,7 @@ ftime_start(void)
                    tempfile);
                return(-1);
        }
-       (void)unlink(tempfile);
+       unlink(tempfile);
 
        return(0);
 }
@@ -460,7 +460,7 @@ chk_ftime(ARCHD *arcn)
                paxwarn(1, "File time table ran out of memory");
 
        if (pt != NULL)
-               (void)free((char *)pt);
+               free((char *)pt);
        return(-1);
 }
 
@@ -538,7 +538,7 @@ add_name(char *oname, int onamelen, char *nname)
                        if (strcmp(nname, pt->nname) == 0)
                                return(0);
 
-                       (void)free((char *)pt->nname);
+                       free((char *)pt->nname);
                        if ((pt->nname = strdup(nname)) == NULL) {
                                paxwarn(1, "Cannot update rename table");
                                return(-1);
@@ -557,9 +557,9 @@ add_name(char *oname, int onamelen, char *nname)
                                ntab[indx] = pt;
                                return(0);
                        }
-                       (void)free((char *)pt->oname);
+                       free((char *)pt->oname);
                }
-               (void)free((char *)pt);
+               free((char *)pt);
        }
        paxwarn(1, "Interactive rename table out of memory");
        return(-1);
@@ -994,7 +994,7 @@ add_atdir(char *fname, dev_t dev, ino_t ino, time_t mtime, time_t atime)
                        atab[indx] = pt;
                        return;
                }
-               (void)free((char *)pt);
+               free((char *)pt);
        }
 
        paxwarn(1, "Directory access time reset table ran out of memory");
@@ -1051,8 +1051,8 @@ get_atdir(dev_t dev, ino_t ino, time_t *mtime, time_t *atime)
        *ppt = pt->fow;
        *mtime = pt->mtime;
        *atime = pt->atime;
-       (void)free((char *)pt->name);
-       (void)free((char *)pt);
+       free((char *)pt->name);
+       free((char *)pt);
        return(0);
 }
 
@@ -1099,7 +1099,7 @@ dir_start(void)
         */
        memcpy(tempbase, _TFILE_BASE, sizeof(_TFILE_BASE));
        if ((dirfd = mkstemp(tempfile)) >= 0) {
-               (void)unlink(tempfile);
+               unlink(tempfile);
                return(0);
        }
        paxwarn(1, "Unable to create temporary file for directory times: %s",
@@ -1199,7 +1199,7 @@ proc_dir(void)
                        set_ftime(name, dblk.mtime, dblk.atime, 0);
        }
 
-       (void)close(dirfd);
+       close(dirfd);
        dirfd = -1;
        if (cnt != dircnt)
                paxwarn(1,"Unable to set mode and times for created directories");
index 27d961a..515fedc 100644 (file)
@@ -36,7 +36,7 @@
  *
  * @(#)tty_subs.c      8.2 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/pax/tty_subs.c,v 1.11.2.1 2001/08/01 05:03:12 obrien Exp $
- * $DragonFly: src/bin/pax/tty_subs.c,v 1.5 2004/10/30 13:34:50 liamfoy Exp $
+ * $DragonFly: src/bin/pax/tty_subs.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -73,9 +73,9 @@ tty_init(void)
                if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) {
                        if ((ttyinf = fdopen(ttyfd, "r")) != NULL)
                                return(0);
-                       (void)fclose(ttyoutf);
+                       fclose(ttyoutf);
                }
-               (void)close(ttyfd);
+               close(ttyfd);
        }
 
        if (iflag) {
@@ -98,9 +98,9 @@ tty_prnt(const char *fmt, ...)
        va_start(ap, fmt);
        if (ttyoutf == NULL)
                return;
-       (void)vfprintf(ttyoutf, fmt, ap);
+       vfprintf(ttyoutf, fmt, ap);
        va_end(ap);
-       (void)fflush(ttyoutf);
+       fflush(ttyoutf);
 }
 
 /*
@@ -146,14 +146,14 @@ paxwarn(int set, const char *fmt, ...)
         * line by itself
         */
        if (vflag && vfpart) {
-               (void)fflush(listf);
-               (void)fputc('\n', stderr);
+               fflush(listf);
+               fputc('\n', stderr);
                vfpart = 0;
        }
-       (void)fprintf(stderr, "%s: ", argv0);
-       (void)vfprintf(stderr, fmt, ap);
+       fprintf(stderr, "%s: ", argv0);
+       vfprintf(stderr, fmt, ap);
        va_end(ap);
-       (void)fputc('\n', stderr);
+       fputc('\n', stderr);
 }
 
 /*
@@ -174,18 +174,18 @@ syswarn(int set, int errnum, const char *fmt, ...)
         * line by itself
         */
        if (vflag && vfpart) {
-               (void)fflush(listf);
-               (void)fputc('\n', stderr);
+               fflush(listf);
+               fputc('\n', stderr);
                vfpart = 0;
        }
-       (void)fprintf(stderr, "%s: ", argv0);
-       (void)vfprintf(stderr, fmt, ap);
+       fprintf(stderr, "%s: ", argv0);
+       vfprintf(stderr, fmt, ap);
        va_end(ap);
 
        /*
         * format and print the errno
         */
        if (errnum > 0)
-               (void)fprintf(stderr, " <%s>", strerror(errnum));
-       (void)fputc('\n', stderr);
+               fprintf(stderr, " <%s>", strerror(errnum));
+       fputc('\n', stderr);
 }
index 648b870..f27c406 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1991, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)pwd.c   8.3 (Berkeley) 4/1/94
  * $FreeBSD: src/bin/pwd/pwd.c,v 1.9.2.3 2002/06/17 11:04:22 tjr Exp $
- * $DragonFly: src/bin/pwd/pwd.c,v 1.3 2004/01/28 16:25:29 joerg Exp $
+ * $DragonFly: src/bin/pwd/pwd.c,v 1.4 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -64,7 +64,7 @@ main(int argc, char *argv[])
                        usage();
                if ((p = realpath(argv[1], buf)) == NULL)
                        err(1, "%s", argv[1]);
-               (void)printf("%s\n", p);
+               printf("%s\n", p);
                exit(0);
        }
 
@@ -105,9 +105,9 @@ usage(void)
 {
 
        if (strcmp(getprogname(), "realpath") == 0)
-               (void)fprintf(stderr, "usage: realpath [path]\n");
+               fprintf(stderr, "usage: realpath [path]\n");
        else
-               (void)fprintf(stderr, "usage: pwd [-LP]\n");
+               fprintf(stderr, "usage: pwd [-LP]\n");
        exit(1);
 }
 
index c317bb1..cd4c7fc 100644 (file)
@@ -40,7 +40,7 @@
  * @(#) Copyright (c) 1983, 1990, 1992, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)rcp.c   8.2 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/rcp/rcp.c,v 1.26.2.5 2002/08/16 20:06:34 ume Exp $
- * $DragonFly: src/bin/rcp/rcp.c,v 1.3 2004/03/19 17:17:46 cpressey Exp $
+ * $DragonFly: src/bin/rcp/rcp.c,v 1.4 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -162,7 +162,7 @@ main(int argc, char *argv[])
 #ifdef KERBEROS
                case 'k':
                        dest_realm = dst_realm_buf;
-                       (void)strncpy(dst_realm_buf, optarg, REALM_SZ - 1);
+                       strncpy(dst_realm_buf, optarg, REALM_SZ - 1);
                        dst_realm_buf[REALM_SZ - 1] = '\0';
                        break;
 #ifdef CRYPT
@@ -227,14 +227,14 @@ main(int argc, char *argv[])
        rem = STDIN_FILENO;             /* XXX */
 
        if (fflag) {                    /* Follow "protocol", send data. */
-               (void)response();
-               (void)setuid(userid);
+               response();
+               setuid(userid);
                source(argc, argv);
                exit(errs);
        }
 
        if (tflag) {                    /* Receive data. */
-               (void)setuid(userid);
+               setuid(userid);
                sink(argc, argv);
                exit(errs);
        }
@@ -247,7 +247,7 @@ main(int argc, char *argv[])
        rem = -1;
        /* Command to be executed on remote system using "rsh". */
 #ifdef KERBEROS
-       (void)snprintf(cmd, sizeof(cmd),
+       snprintf(cmd, sizeof(cmd),
            "rcp%s%s%s%s", iamrecursive ? " -r" : "",
 #ifdef CRYPT
            (doencrypt && use_kerberos ? " -x" : ""),
@@ -256,12 +256,12 @@ main(int argc, char *argv[])
 #endif
            pflag ? " -p" : "", targetshouldbedirectory ? " -d" : "");
 #else
-       (void)snprintf(cmd, sizeof(cmd), "rcp%s%s%s",
+       snprintf(cmd, sizeof(cmd), "rcp%s%s%s",
            iamrecursive ? " -r" : "", pflag ? " -p" : "",
            targetshouldbedirectory ? " -d" : "");
 #endif
 
-       (void)signal(SIGPIPE, lostconn);
+       signal(SIGPIPE, lostconn);
 
        if ((targ = colon(argv[argc - 1])))     /* Dest is remote host. */
                toremote(targ, argc, argv);
@@ -317,25 +317,25 @@ toremote(char *targ, int argc, char *argv[])
                                        ++errs;
                                        continue;
                                }
-                               (void)snprintf(bp, len,
+                               snprintf(bp, len,
                                    "%s %s -l %s -n %s %s '%s%s%s:%s'",
                                    _PATH_RSH, host, suser, cmd, src,
                                    tuser ? tuser : "", tuser ? "@" : "",
                                    thost, targ);
                        } else
-                               (void)snprintf(bp, len,
+                               snprintf(bp, len,
                                    "exec %s %s -n %s %s '%s%s%s:%s'",
                                    _PATH_RSH, argv[i], cmd, src,
                                    tuser ? tuser : "", tuser ? "@" : "",
                                    thost, targ);
-                       (void)susystem(bp, userid);
-                       (void)free(bp);
+                       susystem(bp, userid);
+                       free(bp);
                } else {                        /* local to remote */
                        if (rem == -1) {
                                len = strlen(targ) + CMDNEEDS + 20;
                                if (!(bp = malloc(len)))
                                        err(1, "malloc");
-                               (void)snprintf(bp, len, "%s -t %s", cmd, targ);
+                               snprintf(bp, len, "%s -t %s", cmd, targ);
                                host = thost;
 #ifdef KERBEROS
                                if (use_kerberos)
@@ -358,8 +358,8 @@ toremote(char *targ, int argc, char *argv[])
                                }
                                if (response() < 0)
                                        exit(1);
-                               (void)free(bp);
-                               (void)setuid(userid);
+                               free(bp);
+                               setuid(userid);
                        }
                        source(1, argv+i);
                }
@@ -378,12 +378,12 @@ tolocal(int argc, char *argv[])
                            strlen(argv[argc - 1]) + 20;
                        if (!(bp = malloc(len)))
                                err(1, "malloc");
-                       (void)snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
+                       snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
                            iamrecursive ? " -PR" : "", pflag ? " -p" : "",
                            argv[i], argv[argc - 1]);
                        if (susystem(bp, userid))
                                ++errs;
-                       (void)free(bp);
+                       free(bp);
                        continue;
                }
                *src++ = 0;
@@ -405,7 +405,7 @@ tolocal(int argc, char *argv[])
                len = strlen(src) + CMDNEEDS + 20;
                if ((bp = malloc(len)) == NULL)
                        err(1, "malloc");
-               (void)snprintf(bp, len, "%s -f %s", cmd, src);
+               snprintf(bp, len, "%s -f %s", cmd, src);
                rem =
 #ifdef KERBEROS
                    use_kerberos ?
@@ -413,12 +413,12 @@ tolocal(int argc, char *argv[])
 #endif
                        rcmd_af(&host, port, pwd->pw_name, suser, bp, 0,
                            family);
-               (void)free(bp);
+               free(bp);
                if (rem < 0) {
                        ++errs;
                        continue;
                }
-               (void)seteuid(userid);
+               seteuid(userid);
                if (family == PF_INET) {
                        tos = IPTOS_THROUGHPUT;
                        if (setsockopt(rem, IPPROTO_IP, IP_TOS, &tos,
@@ -426,8 +426,8 @@ tolocal(int argc, char *argv[])
                                warn("TOS (ignored)");
                }
                sink(1, argv + argc - 1);
-               (void)seteuid(0);
-               (void)close(rem);
+               seteuid(0);
+               close(rem);
                rem = -1;
        }
 }
@@ -472,17 +472,17 @@ syserr:                   run_err("%s: %s", name, strerror(errno));
                         * Make it compatible with possible future
                         * versions expecting microseconds.
                         */
-                       (void)snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n",
+                       snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n",
                            (long)stb.st_mtimespec.tv_sec,
                            (long)stb.st_atimespec.tv_sec);
-                       (void)write(rem, buf, strlen(buf));
+                       write(rem, buf, strlen(buf));
                        if (response() < 0)
                                goto next;
                }
 #define        MODEMASK        (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
-               (void)snprintf(buf, sizeof(buf), "C%04o %qd %s\n",
+               snprintf(buf, sizeof(buf), "C%04o %qd %s\n",
                    stb.st_mode & MODEMASK, stb.st_size, last);
-               (void)write(rem, buf, strlen(buf));
+               write(rem, buf, strlen(buf));
                if (response() < 0)
                        goto next;
                if ((bp = allocbuf(&buffer, fd, BUFSIZ)) == NULL) {
@@ -501,7 +501,7 @@ next:                       (void)close(fd);
                                        haderr = result >= 0 ? EIO : errno;
                        }
                        if (haderr)
-                               (void)write(rem, bp->buf, amt);
+                               write(rem, bp->buf, amt);
                        else {
                                result = write(rem, bp->buf, amt);
                                if (result != amt)
@@ -511,10 +511,10 @@ next:                     (void)close(fd);
                if (close(fd) && !haderr)
                        haderr = errno;
                if (!haderr)
-                       (void)write(rem, "", 1);
+                       write(rem, "", 1);
                else
                        run_err("%s: %s", name, strerror(haderr));
-               (void)response();
+               response();
        }
 }
 
@@ -535,18 +535,18 @@ rsource(char *name, struct stat *statp)
        else
                last++;
        if (pflag) {
-               (void)snprintf(path, sizeof(path), "T%ld 0 %ld 0\n",
+               snprintf(path, sizeof(path), "T%ld 0 %ld 0\n",
                    (long)statp->st_mtimespec.tv_sec,
                    (long)statp->st_atimespec.tv_sec);
-               (void)write(rem, path, strlen(path));
+               write(rem, path, strlen(path));
                if (response() < 0) {
                        closedir(dirp);
                        return;
                }
        }
-       (void)snprintf(path, sizeof(path),
+       snprintf(path, sizeof(path),
            "D%04o %d %s\n", statp->st_mode & MODEMASK, 0, last);
-       (void)write(rem, path, strlen(path));
+       write(rem, path, strlen(path));
        if (response() < 0) {
                closedir(dirp);
                return;
@@ -560,13 +560,13 @@ rsource(char *name, struct stat *statp)
                        run_err("%s/%s: name too long", name, dp->d_name);
                        continue;
                }
-               (void)snprintf(path, sizeof(path), "%s/%s", name, dp->d_name);
+               snprintf(path, sizeof(path), "%s/%s", name, dp->d_name);
                vect[0] = path;
                source(1, vect);
        }
-       (void)closedir(dirp);
-       (void)write(rem, "E\n", 2);
-       (void)response();
+       closedir(dirp);
+       write(rem, "E\n", 2);
+       response();
 }
 
 void
@@ -590,7 +590,7 @@ sink(int argc, char *argv[])
        setimes = targisdir = 0;
        mask = umask(0);
        if (!pflag)
-               (void)umask(mask);
+               umask(mask);
        if (argc != 1) {
                run_err("ambiguous target");
                exit(1);
@@ -598,7 +598,7 @@ sink(int argc, char *argv[])
        targ = *argv;
        if (targetshouldbedirectory)
                verifydir(targ);
-       (void)write(rem, "", 1);
+       write(rem, "", 1);
        if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode))
                targisdir = 1;
        for (first = 1;; first = 0) {
@@ -616,7 +616,7 @@ sink(int argc, char *argv[])
 
                if (buf[0] == '\01' || buf[0] == '\02') {
                        if (iamremote == 0)
-                               (void)write(STDERR_FILENO,
+                               write(STDERR_FILENO,
                                    buf + 1, strlen(buf + 1));
                        if (buf[0] == '\02')
                                exit(1);
@@ -624,7 +624,7 @@ sink(int argc, char *argv[])
                        continue;
                }
                if (buf[0] == 'E') {
-                       (void)write(rem, "", 1);
+                       write(rem, "", 1);
                        return;
                }
 
@@ -647,7 +647,7 @@ sink(int argc, char *argv[])
                        atime.tv_usec = strtol(cp, &cp, 10);
                        if (!cp || *cp++ != '\0')
                                SCREWUP("atime.usec not delimited");
-                       (void)write(rem, "", 1);
+                       write(rem, "", 1);
                        continue;
                }
                if (*cp != 'C' && *cp != 'D') {
@@ -690,7 +690,7 @@ sink(int argc, char *argv[])
                                        run_err("%s", strerror(errno));
                                cursize = need;
                        }
-                       (void)snprintf(namebuf, need, "%s%s%s", targ,
+                       snprintf(namebuf, need, "%s%s%s", targ,
                            *targ ? "/" : "", cp);
                        np = namebuf;
                } else
@@ -704,7 +704,7 @@ sink(int argc, char *argv[])
                                        goto bad;
                                }
                                if (pflag)
-                                       (void)chmod(np, mode);
+                                       chmod(np, mode);
                        } else {
                                /* Handle copying from a read-only directory */
                                mod_flag = 1;
@@ -720,7 +720,7 @@ sink(int argc, char *argv[])
                                        np, strerror(errno));
                        }
                        if (mod_flag)
-                               (void)chmod(np, mode);
+                               chmod(np, mode);
                        continue;
                }
                omode = mode;
@@ -729,9 +729,9 @@ sink(int argc, char *argv[])
 bad:                   run_err("%s: %s", np, strerror(errno));
                        continue;
                }
-               (void)write(rem, "", 1);
+               write(rem, "", 1);
                if ((bp = allocbuf(&buffer, ofd, BUFSIZ)) == NULL) {
-                       (void)close(ofd);
+                       close(ofd);
                        continue;
                }
                cp = bp->buf;
@@ -784,8 +784,8 @@ bad:                        run_err("%s: %s", np, strerror(errno));
                                        run_err("%s: set mode: %s",
                                            np, strerror(errno));
                }
-               (void)close(ofd);
-               (void)response();
+               close(ofd);
+               response();
                if (setimes && wrerr == NO) {
                        setimes = 0;
                        if (utimes(np, tv) < 0) {
@@ -799,7 +799,7 @@ bad:                        run_err("%s: %s", np, strerror(errno));
                        run_err("%s: %s", np, strerror(wrerrno));
                        break;
                case NO:
-                       (void)write(rem, "", 1);
+                       write(rem, "", 1);
                        break;
                case DISPLAYED:
                        break;
@@ -872,7 +872,7 @@ response(void)
                } while (cp < &rbuf[BUFSIZ] && ch != '\n');
 
                if (!iamremote)
-                       (void)write(STDERR_FILENO, rbuf, cp - rbuf);
+                       write(STDERR_FILENO, rbuf, cp - rbuf);
                ++errs;
                if (resp == 1)
                        return (-1);
@@ -886,16 +886,16 @@ usage(void)
 {
 #ifdef KERBEROS
 #ifdef CRYPT
-       (void)fprintf(stderr, "%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n",
            "usage: rcp [-46Kpx] [-k realm] f1 f2",
            "       rcp [-46Kprx] [-k realm] f1 ... fn directory");
 #else
-       (void)fprintf(stderr, "%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n",
            "usage: rcp [-46Kp] [-k realm] f1 f2",
            "       rcp [-46Kpr] [-k realm] f1 ... fn directory");
 #endif
 #else
-       (void)fprintf(stderr, "%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n",
            "usage: rcp [-46p] f1 f2",
            "       rcp [-46pr] f1 ... fn directory");
 #endif
@@ -910,9 +910,9 @@ oldw(const char *fmt, ...)
 {
        va_list ap;
        va_start(ap, fmt);
-       (void)fprintf(stderr, "rcp: ");
-       (void)vfprintf(stderr, fmt, ap);
-       (void)fprintf(stderr, ", using standard rcp\n");
+       fprintf(stderr, "rcp: ");
+       vfprintf(stderr, fmt, ap);
+       fprintf(stderr, ", using standard rcp\n");
        va_end(ap);
 }
 #endif
@@ -927,11 +927,11 @@ run_err(const char *fmt, ...)
        ++errs;
        if (fp == NULL && !(fp = fdopen(rem, "w")))
                return;
-       (void)fprintf(fp, "%c", 0x01);
-       (void)fprintf(fp, "rcp: ");
-       (void)vfprintf(fp, fmt, ap);
-       (void)fprintf(fp, "\n");
-       (void)fflush(fp);
+       fprintf(fp, "%c", 0x01);
+       fprintf(fp, "rcp: ");
+       vfprintf(fp, fmt, ap);
+       fprintf(fp, "\n");
+       fflush(fp);
 
        if (!iamremote)
                vwarnx(fmt, ap);
index 73eed57..37c663b 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)util.c  8.2 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/rcp/util.c,v 1.9.2.3 2002/07/19 07:54:51 jmallett Exp $
- * $DragonFly: src/bin/rcp/util.c,v 1.3 2004/03/19 17:17:46 cpressey Exp $
+ * $DragonFly: src/bin/rcp/util.c,v 1.4 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/param.h>
@@ -113,7 +113,7 @@ susystem(char *s, int userid)
                return (127);
 
        case 0:
-               (void)setuid(userid);
+               setuid(userid);
                execl(_PATH_BSHELL, "sh", "-c", s, (char *)NULL);
                _exit(127);
        }
@@ -121,8 +121,8 @@ susystem(char *s, int userid)
        qstat = signal(SIGQUIT, SIG_IGN);
        if (waitpid(pid, &status, 0) < 0)
                status = -1;
-       (void)signal(SIGINT, istat);
-       (void)signal(SIGQUIT, qstat);
+       signal(SIGINT, istat);
+       signal(SIGQUIT, qstat);
        return (status);
 }
 
index 627cdd3..8cb0745 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1990, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)rm.c    8.5 (Berkeley) 4/18/94
  * $FreeBSD: src/bin/rm/rm.c,v 1.29.2.5 2002/07/12 07:25:48 tjr Exp $
- * $DragonFly: src/bin/rm/rm.c,v 1.9 2004/11/06 19:37:44 liamfoy Exp $
+ * $DragonFly: src/bin/rm/rm.c,v 1.10 2004/11/07 20:54:51 eirikn Exp $
  */
 
 #include <sys/stat.h>
@@ -212,7 +212,7 @@ rm_tree(char **argv)
                        /* Pre-order: give user chance to skip. */
                        if (!fflag && !check(p->fts_path, p->fts_accpath,
                            p->fts_statp)) {
-                               (void)fts_set(fts, p, FTS_SKIP);
+                               fts_set(fts, p, FTS_SKIP);
                                p->fts_number = SKIPPED;
                        }
                        else if (!uid &&
@@ -251,7 +251,7 @@ rm_tree(char **argv)
                                rval = rmdir(p->fts_accpath);
                                if (rval == 0 || (fflag && errno == ENOENT)) {
                                        if (rval == 0 && vflag)
-                                               (void)printf("%s\n",
+                                               printf("%s\n",
                                                    p->fts_path);
                                        continue;
                                }
@@ -261,7 +261,7 @@ rm_tree(char **argv)
                                rval = undelete(p->fts_accpath);
                                if (rval == 0 && (fflag && errno == ENOENT)) {
                                        if (vflag)
-                                               (void)printf("%s\n",
+                                               printf("%s\n",
                                                    p->fts_path);
                                        continue;
                                }
@@ -282,7 +282,7 @@ rm_tree(char **argv)
                                rval = unlink(p->fts_accpath);
                                if (rval == 0 || (fflag && errno == ENOENT)) {
                                        if (rval == 0 && vflag)
-                                               (void)printf("%s\n",
+                                               printf("%s\n",
                                                    p->fts_path);
                                        continue;
                                }
@@ -354,7 +354,7 @@ rm_file(char **argv)
                        eval = 1;
                }
                if (vflag && rval == 0)
-                       (void)printf("%s\n", f);
+                       printf("%s\n", f);
        }
 }
 
@@ -434,7 +434,7 @@ check(const char *path, const char *name, struct stat *sp)
 
        /* Check -i first. */
        if (iflag)
-               (void)fprintf(stderr, "remove %s? ", path);
+               fprintf(stderr, "remove %s? ", path);
        else {
                /*
                 * If it's not a symbolic link and it's unwritable and we're
@@ -453,7 +453,7 @@ check(const char *path, const char *name, struct stat *sp)
                strmode(sp->st_mode, modep);
                if ((flagsp = fflagstostr(sp->st_flags)) == NULL)
                        err(1, NULL);
-               (void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
+               fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
                    modep + 1, modep[9] == ' ' ? "" : " ",
                    user_from_uid(sp->st_uid, 0),
                    group_from_gid(sp->st_gid, 0),
@@ -461,7 +461,7 @@ check(const char *path, const char *name, struct stat *sp)
                    path);
                free(flagsp);
        }
-       (void)fflush(stderr);
+       fflush(stderr);
 
        first = ch = getchar();
        while (ch != '\n' && ch != EOF)
@@ -548,7 +548,7 @@ static void
 usage(void)
 {
 
-       (void)fprintf(stderr, "%s\n%s\n",
+       fprintf(stderr, "%s\n%s\n",
            "usage: rm [-f | -i] [-dIPRrvW] file ...",
            "       unlink file");
        exit(EX_USAGE);
index 3f6055d..2d5d1a1 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)rmdir.c 8.3 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/rmdir/rmdir.c,v 1.9.2.2 2001/08/01 05:16:47 obrien Exp $
- * $DragonFly: src/bin/rmdir/rmdir.c,v 1.5 2004/07/24 10:47:10 eirikn Exp $
+ * $DragonFly: src/bin/rmdir/rmdir.c,v 1.6 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <err.h>
@@ -107,6 +107,6 @@ void
 usage(void)
 {
 
-       (void)fprintf(stderr, "usage: rmdir [-p] directory ...\n");
+       fprintf(stderr, "usage: rmdir [-p] directory ...\n");
        exit(1);
 }
index 09dfdd3..67f0400 100644 (file)
@@ -35,7 +35,7 @@
  *
  *     @(#)bltin.h     8.2 (Berkeley) 5/4/95
  * $FreeBSD: src/bin/sh/bltin/bltin.h,v 1.10.2.2 2002/07/19 04:38:54 tjr Exp $
- * $DragonFly: src/bin/sh/bltin/bltin.h,v 1.3 2004/03/19 18:39:41 cpressey Exp $
+ * $DragonFly: src/bin/sh/bltin/bltin.h,v 1.4 2004/11/07 20:54:52 eirikn Exp $
  */
 
 /*
 #define INITARGS(argv)
 #define warnx1(a, b, c) {                              \
        char buf[64];                                   \
-       (void)snprintf(buf, sizeof(buf), a);            \
+       snprintf(buf, sizeof(buf), a);                  \
        error("%s", buf);                               \
 }
 #define warnx2(a, b, c) {                              \
        char buf[64];                                   \
-       (void)snprintf(buf, sizeof(buf), a, b);         \
+       snprintf(buf, sizeof(buf), a, b);               \
        error("%s", buf);                               \
 }
 #define warnx3(a, b, c) {                              \
        char buf[64];                                   \
-       (void)snprintf(buf, sizeof(buf), a, b, c);      \
+       snprintf(buf, sizeof(buf), a, b, c);            \
        error("%s", buf);                               \
 }
 
index 3dcaa25..737cbba 100644 (file)
@@ -35,7 +35,7 @@
  *
  * @(#)input.c 8.3 (Berkeley) 6/9/95
  * $FreeBSD: src/bin/sh/input.c,v 1.14.2.2 2002/08/27 01:36:28 tjr Exp $
- * $DragonFly: src/bin/sh/input.c,v 1.4 2004/03/19 18:39:41 cpressey Exp $
+ * $DragonFly: src/bin/sh/input.c,v 1.5 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <stdio.h>     /* defines BUFSIZ */
@@ -191,7 +191,7 @@ retry:
                        nr = 0;
                else {
                        /* XXX - BUFSIZE should redesign so not necessary */
-                       (void) strcpy(parsenextc, rl_cp);
+                       strcpy(parsenextc, rl_cp);
                }
        } else
 #endif
@@ -401,7 +401,7 @@ setinputfile(const char *fname, int push)
 void
 setinputfd(int fd, int push)
 {
-       (void)fcntl(fd, F_SETFD, FD_CLOEXEC);
+       fcntl(fd, F_SETFD, FD_CLOEXEC);
        if (push) {
                pushfile();
                parsefile->buf = ckmalloc(BUFSIZ);
index fad49b9..23d3191 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1991, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)main.c  8.6 (Berkeley) 5/28/95
  * $FreeBSD: src/bin/sh/main.c,v 1.18.2.3 2002/07/19 04:38:51 tjr Exp $
- * $DragonFly: src/bin/sh/main.c,v 1.4 2004/10/01 20:30:25 dillon Exp $
+ * $DragonFly: src/bin/sh/main.c,v 1.5 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <stdio.h>
@@ -99,7 +99,7 @@ main(int argc, char *argv[])
 #if PROFILE
        monitor(4, etext, profile_buf, sizeof profile_buf, 50);
 #endif
-       (void) setlocale(LC_ALL, "");
+       setlocale(LC_ALL, "");
        state = 0;
        if (setjmp(jmploc.loc)) {
                /*
index 2c6fae7..d8f8203 100644 (file)
@@ -36,7 +36,7 @@
  * @(#) Copyright (c) 1991, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)mknodes.c       8.2 (Berkeley) 5/4/95
  * $FreeBSD: src/bin/sh/mknodes.c,v 1.11.2.3 2002/07/19 04:38:51 tjr Exp $
- * $DragonFly: src/bin/sh/mknodes.c,v 1.2 2003/06/17 04:22:50 dillon Exp $
+ * $DragonFly: src/bin/sh/mknodes.c,v 1.3 2004/11/07 20:54:52 eirikn Exp $
  */
 
 /*
@@ -418,9 +418,9 @@ error(const char *msg, ...)
        va_list va;
        va_start(va, msg);
 
-       (void) fprintf(stderr, "line %d: ", linno);
-       (void) vfprintf(stderr, msg, va);
-       (void) fputc('\n', stderr);
+       fprintf(stderr, "line %d: ", linno);
+       vfprintf(stderr, msg, va);
+       fputc('\n', stderr);
 
        va_end(va);
 
@@ -436,6 +436,6 @@ savestr(const char *s)
 
        if ((p = malloc(strlen(s) + 1)) == NULL)
                error("Out of space");
-       (void) strcpy(p, s);
+       strcpy(p, s);
        return p;
 }
index cb392d7..0095c9b 100644 (file)
@@ -35,7 +35,7 @@
  *
  * @(#)options.c       8.2 (Berkeley) 5/4/95
  * $FreeBSD: src/bin/sh/options.c,v 1.15.2.2 2002/07/19 04:38:52 tjr Exp $
- * $DragonFly: src/bin/sh/options.c,v 1.3 2004/03/19 18:39:41 cpressey Exp $
+ * $DragonFly: src/bin/sh/options.c,v 1.4 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <signal.h>
@@ -184,8 +184,8 @@ options(int cmdline)
                                        argptr++;
                        } else {
                                if (c == 'p' && !val && privileged) {
-                                       (void) setuid(getuid());
-                                       (void) setgid(getgid());
+                                       setuid(getuid());
+                                       setgid(getgid());
                                }
                                setoption(c, val);
                        }
@@ -222,8 +222,8 @@ minus_o(char *name, int val)
                for (i = 0; i < NOPTS; i++)
                        if (equal(name, optlist[i].name)) {
                                if (!val && privileged && equal(name, "privileged")) {
-                                       (void) setuid(getuid());
-                                       (void) setgid(getgid());
+                                       setuid(getuid());
+                                       setgid(getgid());
                                }
                                setoption(optlist[i].letter, val);
                                return;
@@ -439,7 +439,7 @@ atend:
                        }
                        else {
                                out1fmt("Illegal option -%c\n", c);
-                               (void) unsetvar("OPTARG");
+                               unsetvar("OPTARG");
                        }
                        c = '?';
                        goto bad;
@@ -458,7 +458,7 @@ atend:
                        }
                        else {
                                out1fmt("No arg for -%c option\n", c);
-                               (void) unsetvar("OPTARG");
+                               unsetvar("OPTARG");
                                c = '?';
                        }
                        goto bad;
index a600ae0..fdc4a40 100644 (file)
@@ -35,7 +35,7 @@
  *
  * @(#)show.c  8.3 (Berkeley) 5/4/95
  * $FreeBSD: src/bin/sh/show.c,v 1.11.2.3 2002/07/19 04:38:52 tjr Exp $
- * $DragonFly: src/bin/sh/show.c,v 1.2 2003/06/17 04:22:50 dillon Exp $
+ * $DragonFly: src/bin/sh/show.c,v 1.3 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <stdio.h>
@@ -290,9 +290,9 @@ sh_trace(const char *fmt, ...)
        va_list va;
        va_start(va, fmt);
        if (tracefile != NULL) {
-               (void) vfprintf(tracefile, fmt, va);
+               vfprintf(tracefile, fmt, va);
                if (strchr(fmt, '\n'))
-                       (void) fflush(tracefile);
+                       fflush(tracefile);
        }
        va_end(va);
 }
index 5ee6f25..dc46851 100644 (file)
@@ -35,7 +35,7 @@
  *
  * @(#)var.c   8.3 (Berkeley) 5/4/95
  * $FreeBSD: src/bin/sh/var.c,v 1.15.2.2 2002/08/27 01:36:28 tjr Exp $
- * $DragonFly: src/bin/sh/var.c,v 1.6 2004/10/01 20:38:40 dillon Exp $
+ * $DragonFly: src/bin/sh/var.c,v 1.7 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <unistd.h>
@@ -317,7 +317,7 @@ setvareq(char *s, int flags)
                                chkmail(1);
                        if ((vp->flags & VEXPORT) && localevar(s)) {
                                putenv(s);
-                               (void) setlocale(LC_ALL, "");
+                               setlocale(LC_ALL, "");
                        }
                        INTON;
                        return;
@@ -333,7 +333,7 @@ setvareq(char *s, int flags)
        *vpp = vp;
        if ((vp->flags & VEXPORT) && localevar(s)) {
                putenv(s);
-               (void) setlocale(LC_ALL, "");
+               setlocale(LC_ALL, "");
        }
        INTON;
 }
@@ -554,7 +554,7 @@ exportcmd(int argc, char **argv)
                                                vp->flags |= flag;
                                                if ((vp->flags & VEXPORT) && localevar(vp->text)) {
                                                        putenv(vp->text);
-                                                       (void) setlocale(LC_ALL, "");
+                                                       setlocale(LC_ALL, "");
                                                }
                                                goto found;
                                        }
@@ -667,7 +667,7 @@ poplocalvars(void)
                        memcpy(optlist, lvp->text, sizeof optlist);
                        ckfree(lvp->text);
                } else if ((lvp->flags & (VUNSET|VSTRFIXED)) == VUNSET) {
-                       (void)unsetvar(vp->text);
+                       unsetvar(vp->text);
                } else {
                        if ((vp->flags & VTEXTFIXED) == 0)
                                ckfree(vp->text);
index 3c14ff2..13df665 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1988, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)sleep.c 8.3 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/sleep/sleep.c,v 1.9.2.1 2001/08/01 05:23:25 obrien Exp $
- * $DragonFly: src/bin/sleep/sleep.c,v 1.5 2004/10/25 18:25:36 liamfoy Exp $
+ * $DragonFly: src/bin/sleep/sleep.c,v 1.6 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <ctype.h>
@@ -113,7 +113,7 @@ main(int argc, char **argv)
        }
 
        if (!neg && (time_to_sleep.tv_sec > 0 || time_to_sleep.tv_nsec > 0))
-               (void)nanosleep(&time_to_sleep, (struct timespec *)NULL);
+               nanosleep(&time_to_sleep, (struct timespec *)NULL);
 
        exit(0);
 }
@@ -122,6 +122,6 @@ static void
 usage(void)
 {
 
-       (void)fprintf(stderr, "usage: sleep seconds\n");
+       fprintf(stderr, "usage: sleep seconds\n");
        exit(1);
 }
index ca33b5f..da3bff5 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)gfmt.c  8.6 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/stty/gfmt.c,v 1.10.2.2 2001/08/01 05:26:12 obrien Exp $
- * $DragonFly: src/bin/stty/gfmt.c,v 1.4 2003/09/28 14:39:15 hmp Exp $
+ * $DragonFly: src/bin/stty/gfmt.c,v 1.5 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -60,12 +60,12 @@ gprint(struct termios *tp, struct winsize *wp __unused, int ldisc __unused)
 {
        struct cchar *cp;
 
-       (void)printf("gfmt1:cflag=%lx:iflag=%lx:lflag=%lx:oflag=%lx:",
+       printf("gfmt1:cflag=%lx:iflag=%lx:lflag=%lx:oflag=%lx:",
            (u_long)tp->c_cflag, (u_long)tp->c_iflag, (u_long)tp->c_lflag,
            (u_long)tp->c_oflag);
        for (cp = cchars1; cp->name; ++cp)
-               (void)printf("%s=%x:", cp->name, tp->c_cc[cp->sub]);
-       (void)printf("ispeed=%lu:ospeed=%lu\n",
+               printf("%s=%x:", cp->name, tp->c_cc[cp->sub]);
+       printf("ispeed=%lu:ospeed=%lu\n",
            (u_long)cfgetispeed(tp), (u_long)cfgetospeed(tp));
 }
 
@@ -85,7 +85,7 @@ gread(struct termios *tp, char *s)
                if (!(ep = strchr(p, '=')))
                        gerr(p);
                *ep++ = '\0';
-               (void)sscanf(ep, "%lx", &tmp);
+               sscanf(ep, "%lx", &tmp);
 
 #define        CHK(s)  (*p == s[0] && !strcmp(p, s))
                if (CHK("cflag")) {
@@ -97,7 +97,7 @@ gread(struct termios *tp, char *s)
                        continue;
                }
                if (CHK("ispeed")) {
-                       (void)sscanf(ep, "%ld", &tmp);
+                       sscanf(ep, "%ld", &tmp);
                        tp->c_ispeed = tmp;
                        continue;
                }
@@ -110,14 +110,14 @@ gread(struct termios *tp, char *s)
                        continue;
                }
                if (CHK("ospeed")) {
-                       (void)sscanf(ep, "%ld", &tmp);
+                       sscanf(ep, "%ld", &tmp);
                        tp->c_ospeed = tmp;
                        continue;
                }
                for (cp = cchars1; cp->name != NULL; ++cp)
                        if (CHK(cp->name)) {
                                if (cp->sub == VMIN || cp->sub == VTIME)
-                                       (void)sscanf(ep, "%ld", &tmp);
+                                       sscanf(ep, "%ld", &tmp);
                                tp->c_cc[cp->sub] = tmp;
                                break;
                        }
index 0168195..c5c72b9 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)key.c   8.3 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/stty/key.c,v 1.11.2.2 2001/10/15 13:45:05 dd Exp $
- * $DragonFly: src/bin/stty/key.c,v 1.4 2003/09/28 14:39:15 hmp Exp $
+ * $DragonFly: src/bin/stty/key.c,v 1.5 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -195,10 +195,10 @@ f_extproc(struct info *ip)
 
        if (ip->off) {
                int tmp = 0;
-               (void)ioctl(ip->fd, TIOCEXT, &tmp);
+               ioctl(ip->fd, TIOCEXT, &tmp);
        } else {
                int tmp = 1;
-               (void)ioctl(ip->fd, TIOCEXT, &tmp);
+               ioctl(ip->fd, TIOCEXT, &tmp);
        }
 }
 
@@ -272,14 +272,14 @@ void
 f_size(struct info *ip)
 {
 
-       (void)printf("%d %d\n", ip->win.ws_row, ip->win.ws_col);
+       printf("%d %d\n", ip->win.ws_row, ip->win.ws_col);
 }
 
 void
 f_speed(struct info *ip)
 {
 
-       (void)printf("%lu\n", (u_long)cfgetospeed(&ip->t));
+       printf("%lu\n", (u_long)cfgetospeed(&ip->t));
 }
 
 void
index 87d6b0c..e78556d 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @(#)print.c 8.6 (Berkeley) 4/16/94
  * $FreeBSD: src/bin/stty/print.c,v 1.12.2.2 2001/07/04 22:40:00 kris Exp $
- * $DragonFly: src/bin/stty/print.c,v 1.4 2003/09/28 14:39:15 hmp Exp $
+ * $DragonFly: src/bin/stty/print.c,v 1.5 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -90,7 +90,7 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt)
        if (fmt >= BSD)
                cnt += printf(" %d rows; %d columns;", wp->ws_row, wp->ws_col);
        if (cnt)
-               (void)printf("\n");
+               printf("\n");
 
 #define        on(f)   ((tmp & (f)) != 0)
 #define put(n, f, d) \
@@ -188,7 +188,7 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt)
        if (fmt == POSIX) {
                binit("cchars");
                for (p = cchars1; p->name; ++p) {
-                       (void)snprintf(buf1, sizeof(buf1), "%s = %s;",
+                       snprintf(buf1, sizeof(buf1), "%s = %s;",
                            p->name, ccval(p, cc[p->sub]));
                        bput(buf1);
                }
@@ -199,19 +199,19 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt)
                        if (fmt != BSD && cc[p->sub] == p->def)
                                continue;
 #define        WD      "%-8s"
-                       (void)snprintf(buf1 + cnt * 8, sizeof(buf1) - cnt * 8,
+                       snprintf(buf1 + cnt * 8, sizeof(buf1) - cnt * 8,
                            WD, p->name);
-                       (void)snprintf(buf2 + cnt * 8, sizeof(buf2) - cnt * 8,
+                       snprintf(buf2 + cnt * 8, sizeof(buf2) - cnt * 8,
                            WD, ccval(p, cc[p->sub]));
                        if (++cnt == LINELENGTH / 8) {
                                cnt = 0;
-                               (void)printf("%s\n", buf1);
-                               (void)printf("%s\n", buf2);
+                               printf("%s\n", buf1);
+                               printf("%s\n", buf2);
                        }
                }
                if (cnt) {
-                       (void)printf("%s\n", buf1);
-                       (void)printf("%s\n", buf2);
+                       printf("%s\n", buf1);
+                       printf("%s\n", buf2);
                }
        }
 }
@@ -224,7 +224,7 @@ binit(const char *lb)
 {
 
        if (col) {
-               (void)printf("\n");
+               printf("\n");
                col = 0;
        }
        label = lb;
@@ -239,7 +239,7 @@ bput(const char *s)
                return;
        }
        if ((col + strlen(s)) > LINELENGTH) {
-               (void)printf("\n\t");
+               printf("\n\t");
                col = printf("%s", s) + 8;
                return;
        }
@@ -253,7 +253,7 @@ ccval(struct cchar *p, int c)
        char *bp;
 
        if (p->sub == VMIN || p->sub == VTIME) {
-               (void)snprintf(buf, sizeof(buf), "%d", c);
+               snprintf(buf, sizeof(buf), "%d", c);
                return (buf);
        }
        if (c == _POSIX_VDISABLE)
index d9a0488..cdc3632 100644 (file)
@@ -33,7 +33,7 @@
  * @(#) Copyright (c) 1989, 1991, 1993, 1994 The Regents of the University of California.  All rights reserved.
  * @(#)stty.c  8.3 (Berkeley) 4/2/94
  * $FreeBSD: src/bin/stty/stty.c,v 1.13.2.2 2001/07/04 22:40:00 kris Exp $
- * $DragonFly: src/bin/stty/stty.c,v 1.4 2003/09/28 14:39:15 hmp Exp $
+ * $DragonFly: src/bin/stty/stty.c,v 1.5 2004/11/07 20:54:52 eirikn Exp $
  */
 
 #include <sys/types.h>
@@ -152,6 +152,6 @@ void
 usage(void)
 {
 
-       (void)fprintf(stderr, "usage: stty [-a|-e|-g] [-f file] [options]\n");
+       fprintf(stderr, "usage: stty [-a|-e|-g] [-f file] [options]\n");
        exit (1);
 }