ANSI C; sprintf now returns an int.
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 23 Oct 1987 03:30:42 +0000 (19:30 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 23 Oct 1987 03:30:42 +0000 (19:30 -0800)
SCCS-vsn: old/as.tahoe/assyms.c 1.2
SCCS-vsn: sbin/disklabel/disklabel.c 5.11
SCCS-vsn: usr.bin/fstat/fstat.c 5.4
SCCS-vsn: sbin/icheck/icheck.c 5.3
SCCS-vsn: usr.sbin/inetd/inetd.c 5.11
SCCS-vsn: old/mkhosts/mkhosts.c 5.2
SCCS-vsn: usr.sbin/quot/quot.c 4.13
SCCS-vsn: sbin/quotacheck/quotacheck.c 5.8
SCCS-vsn: libexec/rexecd/rexecd.c 5.5
SCCS-vsn: usr.sbin/rmt/rmt.c 5.3
SCCS-vsn: sbin/route/route.c 5.8
SCCS-vsn: usr.sbin/rwhod/rwhod.c 5.10
SCCS-vsn: usr.sbin/sa/sa.c 4.10
SCCS-vsn: sbin/savecore/savecore.c 5.13
SCCS-vsn: libexec/telnetd/telnetd.c 5.23
SCCS-vsn: sbin/tunefs/tunefs.c 5.5
SCCS-vsn: sbin/fsck/inode.c 5.4
SCCS-vsn: sbin/dump/dumprmt.c 5.5
SCCS-vsn: usr.sbin/config/config.h 5.5
SCCS-vsn: usr.sbin/config/config.y 5.5
SCCS-vsn: usr.sbin/config/main.c 5.5
SCCS-vsn: usr.sbin/config/mkioconf.c 5.6
SCCS-vsn: usr.sbin/config/mkmakefile.c 5.19
SCCS-vsn: usr.sbin/config/mkswapconf.c 5.2
SCCS-vsn: libexec/getty/get_date.c 5.2
SCCS-vsn: sbin/newfs/newfs.c 6.14
SCCS-vsn: old/htable/htable.c 5.6
SCCS-vsn: libexec/talkd/announce.c 5.4
SCCS-vsn: libexec/talkd/print.c 5.4
SCCS-vsn: sbin/XNSrouted/trace.c 5.7
SCCS-vsn: usr.sbin/bad144/bad144.c 5.11
SCCS-vsn: games/cribbage/score.c 5.2
SCCS-vsn: games/cribbage/support.c 5.2

33 files changed:
usr/src/games/cribbage/score.c
usr/src/games/cribbage/support.c
usr/src/libexec/getty/get_date.c
usr/src/libexec/rexecd/rexecd.c
usr/src/libexec/talkd/announce.c
usr/src/libexec/talkd/print.c
usr/src/libexec/telnetd/telnetd.c
usr/src/old/as.tahoe/assyms.c
usr/src/old/htable/htable.c
usr/src/old/mkhosts/mkhosts.c
usr/src/sbin/XNSrouted/trace.c
usr/src/sbin/disklabel/disklabel.c
usr/src/sbin/dump/dumprmt.c
usr/src/sbin/fsck/inode.c
usr/src/sbin/icheck/icheck.c
usr/src/sbin/newfs/newfs.c
usr/src/sbin/quotacheck/quotacheck.c
usr/src/sbin/route/route.c
usr/src/sbin/savecore/savecore.c
usr/src/sbin/tunefs/tunefs.c
usr/src/usr.bin/fstat/fstat.c
usr/src/usr.sbin/bad144/bad144.c
usr/src/usr.sbin/config/config.h
usr/src/usr.sbin/config/config.y
usr/src/usr.sbin/config/main.c
usr/src/usr.sbin/config/mkioconf.c
usr/src/usr.sbin/config/mkmakefile.c
usr/src/usr.sbin/config/mkswapconf.c
usr/src/usr.sbin/inetd/inetd.c
usr/src/usr.sbin/quot/quot.c
usr/src/usr.sbin/rmt/rmt.c
usr/src/usr.sbin/rwhod/rwhod.c
usr/src/usr.sbin/sa/sa.c

index 0c90dd1..f9dd008 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)score.c    5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)score.c    5.2 (Berkeley) %G%";
 #endif not lint
 
 #include       <stdio.h>
 #endif not lint
 
 #include       <stdio.h>
@@ -125,7 +125,7 @@ BOOLEAN                     do_explain;     /* true if must explain this hand */
        score += i;
        if (do_explain)
            if (i > 0) {
        score += i;
        if (do_explain)
            if (i > 0) {
-               sprintf(buf, "%d points in fifteens", i);
+               (void)sprintf(buf, "%d points in fifteens", i);
                strcat(expl, buf);
            }
            else
                strcat(expl, buf);
            }
            else
@@ -134,8 +134,8 @@ BOOLEAN                     do_explain;     /* true if must explain this hand */
        score += i;
        if (do_explain)
            if (i > 0) {
        score += i;
        if (do_explain)
            if (i > 0) {
-               sprintf(buf, ", %d points in pairs, %d in runs", pairpoints,
-                   runpoints);
+               (void)sprintf(buf, ", %d points in pairs, %d in runs",
+                       pairpoints, runpoints);
                strcat(expl, buf);
            }
            else
                strcat(expl, buf);
            }
            else
index 97afd8b..679426c 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)support.c  5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)support.c  5.2 (Berkeley) %G%";
 #endif not lint
 
 #include       <curses.h>
 #endif not lint
 
 #include       <curses.h>
@@ -94,7 +94,7 @@ char          *s;
     static char                prompt[BUFSIZ];
 
     prhand(hand, CINHAND, Playwin, FALSE);
     static char                prompt[BUFSIZ];
 
     prhand(hand, CINHAND, Playwin, FALSE);
-    sprintf(prompt, "Your %s scores ", s);
+    (void)sprintf(prompt, "Your %s scores ", s);
     i = scorehand(hand, turnover, CINHAND, strcmp(s, "crib") == 0, explain);
     if ((j = number(0, 29, prompt)) == 19)
        j = 0;
     i = scorehand(hand, turnover, CINHAND, strcmp(s, "crib") == 0, explain);
     if ((j = number(0, 29, prompt)) == 19)
        j = 0;
index 339ef44..93f7bb1 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)get_date.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)get_date.c 5.2 (Berkeley) %G%";
 #endif not lint
 
 #include <stdio.h>
 #endif not lint
 
 #include <stdio.h>
@@ -47,7 +47,7 @@ get_date(datebuffer)
        
        /* format is '8:10pm on Sunday, 16 Sept 1973' */
 
        
        /* format is '8:10pm on Sunday, 16 Sept 1973' */
 
-       sprintf(datebuffer, "%d:%02d%s on %s, %d %s %d",
+       (void)sprintf(datebuffer, "%d:%02d%s on %s, %d %s %d",
                realhour,
                tmp->tm_min,
                zone,
                realhour,
                tmp->tm_min,
                zone,
index 2cae97a..632bf24 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)rexecd.c   5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)rexecd.c   5.5 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/ioctl.h>
 #endif not lint
 
 #include <sys/ioctl.h>
@@ -29,7 +29,7 @@ static char sccsid[] = "@(#)rexecd.c  5.4 (Berkeley) %G%";
 
 extern errno;
 struct passwd *getpwnam();
 
 extern errno;
 struct passwd *getpwnam();
-char   *crypt(), *rindex(), *strncat(), *sprintf();
+char   *crypt(), *rindex(), *strncat();
 /*VARARGS1*/
 int    error();
 
 /*VARARGS1*/
 int    error();
 
index bafbe23..b5b6bbe 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)announce.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)announce.c 5.4 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/types.h>
 #endif not lint
 
 #include <sys/types.h>
@@ -72,7 +72,7 @@ announce_proc(request, remote_machine)
        FILE *tf;
        struct stat stbuf;
 
        FILE *tf;
        struct stat stbuf;
 
-       sprintf(full_tty, "/dev/%s", request->r_tty);
+       (void)sprintf(full_tty, "/dev/%s", request->r_tty);
        if (access(full_tty, 0) != 0)
                return (FAILED);
        if ((tf = fopen(full_tty, "w")) == NULL)
        if (access(full_tty, 0) != 0)
                return (FAILED);
        if ((tf = fopen(full_tty, "w")) == NULL)
@@ -121,26 +121,26 @@ print_mesg(tf, request, remote_machine)
        max_size = 0;
        gettimeofday(&clock, &zone);
        localclock = localtime( &clock.tv_sec );
        max_size = 0;
        gettimeofday(&clock, &zone);
        localclock = localtime( &clock.tv_sec );
-       sprintf(line_buf[i], " ");
+       (void)sprintf(line_buf[i], " ");
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
-       sprintf(line_buf[i], "Message from Talk_Daemon@%s at %d:%02d ...",
+       (void)sprintf(line_buf[i], "Message from Talk_Daemon@%s at %d:%02d ...",
        hostname, localclock->tm_hour , localclock->tm_min );
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
        hostname, localclock->tm_hour , localclock->tm_min );
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
-       sprintf(line_buf[i], "talk: connection requested by %s@%s.",
+       (void)sprintf(line_buf[i], "talk: connection requested by %s@%s.",
                request->l_name, remote_machine);
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
                request->l_name, remote_machine);
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
-       sprintf(line_buf[i], "talk: respond with:  talk %s@%s",
+       (void)sprintf(line_buf[i], "talk: respond with:  talk %s@%s",
                request->l_name, remote_machine);
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
                request->l_name, remote_machine);
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
-       sprintf(line_buf[i], " ");
+       (void)sprintf(line_buf[i], " ");
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
        sizes[i] = strlen(line_buf[i]);
        max_size = max(max_size, sizes[i]);
        i++;
index dcad111..6e7a8a9 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)print.c    5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)print.c    5.4 (Berkeley) %G%";
 #endif not lint
 
 /* debug print routines */
 #endif not lint
 
 /* debug print routines */
@@ -31,7 +31,7 @@ print_request(cp, mp)
        char tbuf[80], *tp;
        
        if (mp->type > NTYPES) {
        char tbuf[80], *tp;
        
        if (mp->type > NTYPES) {
-               sprintf(tbuf, "type %d", mp->type);
+               (void)sprintf(tbuf, "type %d", mp->type);
                tp = tbuf;
        } else
                tp = types[mp->type];
                tp = tbuf;
        } else
                tp = types[mp->type];
@@ -46,12 +46,12 @@ print_response(cp, rp)
        char tbuf[80], *tp, abuf[80], *ap;
        
        if (rp->type > NTYPES) {
        char tbuf[80], *tp, abuf[80], *ap;
        
        if (rp->type > NTYPES) {
-               sprintf(tbuf, "type %d", rp->type);
+               (void)sprintf(tbuf, "type %d", rp->type);
                tp = tbuf;
        } else
                tp = types[rp->type];
        if (rp->answer > NANSWERS) {
                tp = tbuf;
        } else
                tp = types[rp->type];
        if (rp->answer > NANSWERS) {
-               sprintf(abuf, "answer %d", rp->answer);
+               (void)sprintf(abuf, "answer %d", rp->answer);
                ap = abuf;
        } else
                ap = answers[rp->answer];
                ap = abuf;
        } else
                ap = answers[rp->answer];
index a3f004c..5fd4f19 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)telnetd.c  5.22 (Berkeley) %G%";
+static char sccsid[] = "@(#)telnetd.c  5.23 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -413,7 +413,7 @@ telnet(f, p)
         * WE, the server, sends it; it does NOT mean that the client will
         * echo the terminal input).
         */
         * WE, the server, sends it; it does NOT mean that the client will
         * echo the terminal input).
         */
-       sprintf(nfrontp, doopt, TELOPT_ECHO);
+       (void) sprintf(nfrontp, doopt, TELOPT_ECHO);
        nfrontp += sizeof doopt-2;
        hisopts[TELOPT_ECHO] = OPT_YES_BUT_ALWAYS_LOOK;
 
        nfrontp += sizeof doopt-2;
        hisopts[TELOPT_ECHO] = OPT_YES_BUT_ALWAYS_LOOK;
 
@@ -857,7 +857,7 @@ willoption(option)
        } else {
                hisopts[option] = OPT_NO;
        }
        } else {
                hisopts[option] = OPT_NO;
        }
-       sprintf(nfrontp, fmt, option);
+       (void) sprintf(nfrontp, fmt, option);
        nfrontp += sizeof (dont) - 2;
 }
 
        nfrontp += sizeof (dont) - 2;
 }
 
@@ -882,7 +882,7 @@ wontoption(option)
 
        fmt = dont;
        hisopts[option] = OPT_NO;
 
        fmt = dont;
        hisopts[option] = OPT_NO;
-       sprintf(nfrontp, fmt, option);
+       (void) sprintf(nfrontp, fmt, option);
        nfrontp += sizeof (doopt) - 2;
 }
 
        nfrontp += sizeof (doopt) - 2;
 }
 
@@ -920,7 +920,7 @@ dooption(option)
        } else {
            myopts[option] = OPT_NO;
        }
        } else {
            myopts[option] = OPT_NO;
        }
-       sprintf(nfrontp, fmt, option);
+       (void) sprintf(nfrontp, fmt, option);
        nfrontp += sizeof (doopt) - 2;
 }
 
        nfrontp += sizeof (doopt) - 2;
 }
 
@@ -946,7 +946,7 @@ int option;
     } else {
        myopts[option] = OPT_YES;
     }
     } else {
        myopts[option] = OPT_YES;
     }
-    sprintf(nfrontp, fmt, option);
+    (void) sprintf(nfrontp, fmt, option);
     nfrontp += sizeof (wont) - 2;
 }
 
     nfrontp += sizeof (wont) - 2;
 }
 
index 48ebfe7..3f0b1da 100644 (file)
@@ -341,7 +341,7 @@ char *tagstring(tag)
                case OKTOBUMP:          return("oktobump");
                case ISET:              return("iset");
                case ILSYM:             return("ilsym");
                case OKTOBUMP:          return("oktobump");
                case ISET:              return("iset");
                case ILSYM:             return("ilsym");
-               default:                sprintf(tagbuff,"%d", tag);
+               default:                (void)sprintf(tagbuff,"%d", tag);
                                        return(tagbuff);
        }
 }
                                        return(tagbuff);
        }
 }
index 02974e9..07e11c9 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)htable.c   5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)htable.c   5.6 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -458,7 +458,8 @@ putaddr(f, v)
        register char *a = (char *)&v;
        char buf[32];
 
        register char *a = (char *)&v;
        char buf[32];
 
-       sprintf(buf,"%d.%d.%d.%d", UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]));
+       (void) sprintf(buf,"%d.%d.%d.%d",
+               UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]));
        fprintf(f, "%-16.16s", buf);
 }
 
        fprintf(f, "%-16.16s", buf);
 }
 
index 921586d..93b6e67 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)mkhosts.c  5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkhosts.c  5.2 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/file.h>
 #endif not lint
 
 #include <sys/file.h>
@@ -47,7 +47,7 @@ main(argc, argv)
        }
        umask(0);
 
        }
        umask(0);
 
-       sprintf(tempname, "%s.new", argv[1]);
+       (void)sprintf(tempname, "%s.new", argv[1]);
        dp = dbm_open(tempname, O_WRONLY|O_CREAT|O_EXCL, 0644);
        if (dp == NULL) {
                fprintf(stderr, "dbm_open failed: ");
        dp = dbm_open(tempname, O_WRONLY|O_CREAT|O_EXCL, 0644);
        if (dp == NULL) {
                fprintf(stderr, "dbm_open failed: ");
@@ -108,14 +108,14 @@ main(argc, argv)
        endhostent();
        dbm_close(dp);
 
        endhostent();
        dbm_close(dp);
 
-       sprintf(tempname, "%s.new.pag", argv[1]);
-       sprintf(newname, "%s.pag", argv[1]);
+       (void)sprintf(tempname, "%s.new.pag", argv[1]);
+       (void)sprintf(newname, "%s.pag", argv[1]);
        if (rename(tempname, newname) < 0) {
                perror("rename .pag");
                exit(1);
        }
        if (rename(tempname, newname) < 0) {
                perror("rename .pag");
                exit(1);
        }
-       sprintf(tempname, "%s.new.dir", argv[1]);
-       sprintf(newname, "%s.dir", argv[1]);
+       (void)sprintf(tempname, "%s.new.dir", argv[1]);
+       (void)sprintf(newname, "%s.dir", argv[1]);
        if (rename(tempname, newname) < 0) {
                perror("rename .dir");
                exit(1);
        if (rename(tempname, newname) < 0) {
                perror("rename .dir");
                exit(1);
@@ -123,9 +123,9 @@ main(argc, argv)
        printf("%d host entries, maximum length %d\n", entries, maxlen);
        exit(0);
 err:
        printf("%d host entries, maximum length %d\n", entries, maxlen);
        exit(0);
 err:
-       sprintf(tempname, "%s.new.pag", argv[1]);
+       (void)sprintf(tempname, "%s.new.pag", argv[1]);
        unlink(tempname);
        unlink(tempname);
-       sprintf(tempname, "%s.new.dir", argv[1]);
+       (void)sprintf(tempname, "%s.new.dir", argv[1]);
        unlink(tempname);
        exit(1);
 }
        unlink(tempname);
        exit(1);
 }
index 4390cb2..b5e0836 100644 (file)
@@ -9,7 +9,7 @@
 
 
 #ifndef lint
 
 
 #ifndef lint
-static char sccsid[] = "@(#)trace.c    5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)trace.c    5.7 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -264,7 +264,7 @@ union ns_net val;
 {
        static char buf[100];
        net.net_e = val;
 {
        static char buf[100];
        net.net_e = val;
-       sprintf(buf, "%lx", ntohl(net.long_e));
+       (void)sprintf(buf, "%lx", ntohl(net.long_e));
        return (buf);
 }
 
        return (buf);
 }
 
@@ -275,7 +275,7 @@ struct ns_addr *addr;
 {
     static char buf[100];
 
 {
     static char buf[100];
 
-    sprintf(buf, "%s#%x:%x:%x:%x:%x:%x",
+    (void)sprintf(buf, "%s#%x:%x:%x:%x:%x:%x",
        xns_nettoa(addr->x_net),
        addr->x_host.c_host[0], addr->x_host.c_host[1], 
        addr->x_host.c_host[2], addr->x_host.c_host[3], 
        xns_nettoa(addr->x_net),
        addr->x_host.c_host[0], addr->x_host.c_host[1], 
        addr->x_host.c_host[2], addr->x_host.c_host[3], 
index b61cc7c..61b40ed 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)disklabel.c        5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)disklabel.c        5.11 (Berkeley) %G%";
 /* from static char sccsid[] = "@(#)disklabel.c        1.2 (Symmetric) 11/28/85"; */
 #endif
 
 /* from static char sccsid[] = "@(#)disklabel.c        1.2 (Symmetric) 11/28/85"; */
 #endif
 
@@ -60,7 +60,6 @@ char  *bootxx;
 char   *dkname;
 char   *specname;
 char   tmpfil[] = "/tmp/EdDk.aXXXXXX";
 char   *dkname;
 char   *specname;
 char   tmpfil[] = "/tmp/EdDk.aXXXXXX";
-char   *sprintf();
 
 extern int errno;
 char   namebuf[BBSIZE], *np = namebuf;
 
 extern int errno;
 char   namebuf[BBSIZE], *np = namebuf;
@@ -107,14 +106,14 @@ main(argc, argv)
 
        dkname = argv[0];
        if (dkname[0] != '/') {
 
        dkname = argv[0];
        if (dkname[0] != '/') {
-               sprintf(np, "/dev/r%s%c", dkname, RAWPARTITION);
+               (void)sprintf(np, "/dev/r%s%c", dkname, RAWPARTITION);
                specname = np;
                np += strlen(specname) + 1;
        } else
                specname = dkname;
        f = open(specname, op == READ ? O_RDONLY : O_RDWR);
        if (f < 0 && errno == ENOENT && dkname[0] != '/') {
                specname = np;
                np += strlen(specname) + 1;
        } else
                specname = dkname;
        f = open(specname, op == READ ? O_RDONLY : O_RDWR);
        if (f < 0 && errno == ENOENT && dkname[0] != '/') {
-               sprintf(specname, "/dev/r%s", dkname);
+               (void)sprintf(specname, "/dev/r%s", dkname);
                np = namebuf + strlen(specname) + 1;
                f = open(specname, op == READ ? O_RDONLY : O_RDWR);
        }
                np = namebuf + strlen(specname) + 1;
                f = open(specname, op == READ ? O_RDONLY : O_RDWR);
        }
@@ -297,15 +296,15 @@ makebootarea(boot, dp)
                        *np++ = *p++;
                *np++ = '\0';
 
                        *np++ = *p++;
                *np++ = '\0';
 
-               sprintf(np, "%s/%sboot", BOOTDIR, dkbasename);
+               (void)sprintf(np, "%s/%sboot", BOOTDIR, dkbasename);
                if (access(np, F_OK) < 0 && dkbasename[0] == 'r')
                        dkbasename++;
                xxboot = np;
                if (access(np, F_OK) < 0 && dkbasename[0] == 'r')
                        dkbasename++;
                xxboot = np;
-               sprintf(xxboot, "%s/%sboot", BOOTDIR, dkbasename);
+               (void)sprintf(xxboot, "%s/%sboot", BOOTDIR, dkbasename);
                np += strlen(xxboot) + 1;
 
                bootxx = np;
                np += strlen(xxboot) + 1;
 
                bootxx = np;
-               sprintf(bootxx, "%s/boot%s", BOOTDIR, dkbasename);
+               (void)sprintf(bootxx, "%s/boot%s", BOOTDIR, dkbasename);
                np += strlen(bootxx) + 1;
        }
 
                np += strlen(bootxx) + 1;
        }
 
index 65d1a40..9acc174 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)dumprmt.c  5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)dumprmt.c  5.5 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/param.h>
 #endif not lint
 
 #include <sys/param.h>
@@ -80,7 +80,7 @@ rmtopen(tape, mode)
 {
        char buf[256];
 
 {
        char buf[256];
 
-       sprintf(buf, "O%s\n%d\n", tape, mode);
+       (void)sprintf(buf, "O%s\n%d\n", tape, mode);
        rmtstate = TS_OPEN;
        return (rmtcall(tape, buf));
 }
        rmtstate = TS_OPEN;
        return (rmtcall(tape, buf));
 }
@@ -102,7 +102,7 @@ rmtread(buf, count)
        int n, i, cc;
        extern errno;
 
        int n, i, cc;
        extern errno;
 
-       sprintf(line, "R%d\n", count);
+       (void)sprintf(line, "R%d\n", count);
        n = rmtcall("read", line);
        if (n < 0) {
                errno = n;
        n = rmtcall("read", line);
        if (n < 0) {
                errno = n;
@@ -123,7 +123,7 @@ rmtwrite(buf, count)
 {
        char line[30];
 
 {
        char line[30];
 
-       sprintf(line, "W%d\n", count);
+       (void)sprintf(line, "W%d\n", count);
        write(rmtape, line, strlen(line));
        write(rmtape, buf, count);
        return (rmtreply("write"));
        write(rmtape, line, strlen(line));
        write(rmtape, buf, count);
        return (rmtreply("write"));
@@ -134,7 +134,7 @@ rmtwrite0(count)
 {
        char line[30];
 
 {
        char line[30];
 
-       sprintf(line, "W%d\n", count);
+       (void)sprintf(line, "W%d\n", count);
        write(rmtape, line, strlen(line));
 }
 
        write(rmtape, line, strlen(line));
 }
 
@@ -158,7 +158,7 @@ rmtseek(offset, pos)
 {
        char line[80];
 
 {
        char line[80];
 
-       sprintf(line, "L%d\n%d\n", offset, pos);
+       (void)sprintf(line, "L%d\n%d\n", offset, pos);
        return (rmtcall("seek", line));
 }
 
        return (rmtcall("seek", line));
 }
 
@@ -185,7 +185,7 @@ rmtioctl(cmd, count)
 
        if (count < 0)
                return (-1);
 
        if (count < 0)
                return (-1);
-       sprintf(buf, "I%d\n%d\n", cmd, count);
+       (void)sprintf(buf, "I%d\n%d\n", cmd, count);
        return (rmtcall("ioctl", buf));
 }
 
        return (rmtcall("ioctl", buf));
 }
 
index f8ea149..15ff773 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)inode.c    5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)inode.c    5.4 (Berkeley) %G%";
 #endif not lint
 
 #include <pwd.h>
 #endif not lint
 
 #include <pwd.h>
@@ -92,7 +92,7 @@ iblock(idesc, ilevel, isize)
                for (ap = &ib.b_un.b_indir[nif]; ap < aplim; ap++) {
                        if (*ap == 0)
                                continue;
                for (ap = &ib.b_un.b_indir[nif]; ap < aplim; ap++) {
                        if (*ap == 0)
                                continue;
-                       sprintf(buf, "PARTIALLY TRUNCATED INODE I=%d",
+                       (void)sprintf(buf, "PARTIALLY TRUNCATED INODE I=%d",
                                idesc->id_number);
                        if (dofix(idesc, buf)) {
                                *ap = 0;
                                idesc->id_number);
                        if (dofix(idesc, buf)) {
                                *ap = 0;
index f633edb..d92f04a 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)icheck.c   5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)icheck.c   5.3 (Berkeley) %G%";
 #endif not lint
 
 
 #endif not lint
 
 
@@ -196,11 +196,11 @@ check(file)
                                d = cgbase(&sblock, c);
                        else
                                d = cgsblock(&sblock, c);
                                d = cgbase(&sblock, c);
                        else
                                d = cgsblock(&sblock, c);
-                       sprintf(buf, "spare super block %d", c);
+                       (void)sprintf(buf, "spare super block %d", c);
                        for (; d < cgd; d += sblock.fs_frag)
                                chk(d, buf, sblock.fs_bsize);
                        d = cgimin(&sblock, c);
                        for (; d < cgd; d += sblock.fs_frag)
                                chk(d, buf, sblock.fs_bsize);
                        d = cgimin(&sblock, c);
-                       sprintf(buf, "cylinder group %d", c);
+                       (void)sprintf(buf, "cylinder group %d", c);
                        while (cgd < d) {
                                chk(cgd, buf, sblock.fs_bsize);
                                cgd += sblock.fs_frag;
                        while (cgd < d) {
                                chk(cgd, buf, sblock.fs_bsize);
                                cgd += sblock.fs_frag;
@@ -208,7 +208,7 @@ check(file)
                        d = cgdmin(&sblock, c);
                        i = INOPB(&sblock);
                        for (; cgd < d; cgd += sblock.fs_frag) {
                        d = cgdmin(&sblock, c);
                        i = INOPB(&sblock);
                        for (; cgd < d; cgd += sblock.fs_frag) {
-                               sprintf(buf, "inodes %d-%d", ino, ino + i);
+                               (void)sprintf(buf, "inodes %d-%d", ino, ino + i);
                                chk(cgd, buf, sblock.fs_bsize);
                                ino += i;
                        }
                                chk(cgd, buf, sblock.fs_bsize);
                                ino += i;
                        }
@@ -340,7 +340,7 @@ pass1(ip)
                if (db == 0)
                        continue;
                siz = dblksize(&sblock, ip, i);
                if (db == 0)
                        continue;
                siz = dblksize(&sblock, ip, i);
-               sprintf(buf, "logical data block %d", i);
+               (void)sprintf(buf, "logical data block %d", i);
                chk(db, buf, siz);
                if (siz == sblock.fs_bsize)
                        nblock++;
                chk(db, buf, siz);
                if (siz == sblock.fs_bsize)
                        nblock++;
@@ -362,7 +362,7 @@ pass1(ip)
                        if (i == 0) {
                                lbn = NDADDR + j;
                                siz = dblksize(&sblock, ip, lbn);
                        if (i == 0) {
                                lbn = NDADDR + j;
                                siz = dblksize(&sblock, ip, lbn);
-                               sprintf(buf, "logical data block %d", lbn);
+                               (void)sprintf(buf, "logical data block %d", lbn);
                                chk(ib, buf, siz);
                                if (siz == sblock.fs_bsize)
                                        nblock++;
                                chk(ib, buf, siz);
                                if (siz == sblock.fs_bsize)
                                        nblock++;
@@ -381,7 +381,7 @@ pass1(ip)
                                        continue;
                                lbn = NDADDR + NINDIR(&sblock) * (i + j) + k;
                                siz = dblksize(&sblock, ip, lbn);
                                        continue;
                                lbn = NDADDR + NINDIR(&sblock) * (i + j) + k;
                                siz = dblksize(&sblock, ip, lbn);
-                               sprintf(buf, "logical data block %d", lbn);
+                               (void)sprintf(buf, "logical data block %d", lbn);
                                chk(ib, buf, siz);
                                if (siz == sblock.fs_bsize)
                                        nblock++;
                                chk(ib, buf, siz);
                                if (siz == sblock.fs_bsize)
                                        nblock++;
index f5a5365..2881a83 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)newfs.c    6.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)newfs.c    6.14 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -129,7 +129,6 @@ char        device[MAXPATHLEN];
 extern int errno;
 char   *index();
 char   *rindex();
 extern int errno;
 char   *index();
 char   *rindex();
-char   *sprintf();
 
 main(argc, argv)
        int argc;
 
 main(argc, argv)
        int argc;
@@ -373,7 +372,8 @@ next:
                special = cp + 1;
        if (*special == 'r' && special[1] != 'a' && special[1] != 'b')
                special++;
                special = cp + 1;
        if (*special == 'r' && special[1] != 'a' && special[1] != 'b')
                special++;
-       special = sprintf(device, "/dev/r%s", special);
+       (void)sprintf(device, "/dev/r%s", special);
+       special = device;
        if (!Nflag) {
                fso = open(special, O_WRONLY);
                if (fso < 0) {
        if (!Nflag) {
                fso = open(special, O_WRONLY);
                if (fso < 0) {
index d15a94e..334574a 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)quotacheck.c       5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)quotacheck.c       5.8 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -185,7 +185,7 @@ preen(argc, argv)
                                break;
 
                        case 0:
                                break;
 
                        case 0:
-                               sprintf(quotafile, "%s/%s",
+                               (void) sprintf(quotafile, "%s/%s",
                                        fs->fs_file, qfname);
                                exit(chkquota(fs->fs_spec,
                                        fs->fs_file, quotafile));
                                        fs->fs_file, qfname);
                                exit(chkquota(fs->fs_spec,
                                        fs->fs_file, quotafile));
index 6c70993..6caed26 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)route.c    5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)route.c    5.8 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/param.h>
 #endif not lint
 
 #include <sys/param.h>
@@ -200,7 +200,7 @@ routename(sa)
                else {
 #define C(x)   ((x) & 0xff)
                        in.s_addr = ntohl(in.s_addr);
                else {
 #define C(x)   ((x) & 0xff)
                        in.s_addr = ntohl(in.s_addr);
-                       sprintf(line, "%u.%u.%u.%u", C(in.s_addr >> 24),
+                       (void)sprintf(line, "%u.%u.%u.%u", C(in.s_addr >> 24),
                           C(in.s_addr >> 16), C(in.s_addr >> 8), C(in.s_addr));
                }
                break;
                           C(in.s_addr >> 16), C(in.s_addr >> 8), C(in.s_addr));
                }
                break;
@@ -212,8 +212,8 @@ routename(sa)
        default:
            {   u_short *s = (u_short *)sa->sa_data;
 
        default:
            {   u_short *s = (u_short *)sa->sa_data;
 
-               sprintf(line, "af %d: %x %x %x %x %x %x %x", sa->sa_family,
-                       s[0], s[1], s[2], s[3], s[4], s[5], s[6]);
+               (void)sprintf(line, "af %d: %x %x %x %x %x %x %x",
+                   sa->sa_family, s[0], s[1], s[2], s[3], s[4], s[5], s[6]);
                break;
            }
        }
                break;
            }
        }
@@ -273,15 +273,15 @@ netname(sa)
                if (cp)
                        strcpy(line, cp);
                else if ((in.s_addr & 0xffffff) == 0)
                if (cp)
                        strcpy(line, cp);
                else if ((in.s_addr & 0xffffff) == 0)
-                       sprintf(line, "%u", C(in.s_addr >> 24));
+                       (void)sprintf(line, "%u", C(in.s_addr >> 24));
                else if ((in.s_addr & 0xffff) == 0)
                else if ((in.s_addr & 0xffff) == 0)
-                       sprintf(line, "%u.%u", C(in.s_addr >> 24),
+                       (void)sprintf(line, "%u.%u", C(in.s_addr >> 24),
                            C(in.s_addr >> 16));
                else if ((in.s_addr & 0xff) == 0)
                            C(in.s_addr >> 16));
                else if ((in.s_addr & 0xff) == 0)
-                       sprintf(line, "%u.%u.%u", C(in.s_addr >> 24),
+                       (void)sprintf(line, "%u.%u.%u", C(in.s_addr >> 24),
                            C(in.s_addr >> 16), C(in.s_addr >> 8));
                else
                            C(in.s_addr >> 16), C(in.s_addr >> 8));
                else
-                       sprintf(line, "%u.%u.%u.%u", C(in.s_addr >> 24),
+                       (void)sprintf(line, "%u.%u.%u.%u", C(in.s_addr >> 24),
                            C(in.s_addr >> 16), C(in.s_addr >> 8),
                            C(in.s_addr));
                break;
                            C(in.s_addr >> 16), C(in.s_addr >> 8),
                            C(in.s_addr));
                break;
@@ -294,8 +294,8 @@ netname(sa)
        default:
            {   u_short *s = (u_short *)sa->sa_data;
 
        default:
            {   u_short *s = (u_short *)sa->sa_data;
 
-               sprintf(line, "af %d: %x %x %x %x %x %x %x", sa->sa_family,
-                       s[0], s[1], s[2], s[3], s[4], s[5], s[6]);
+               (void)sprintf(line, "af %d: %x %x %x %x %x %x %x",
+                   sa->sa_family, s[0], s[1], s[2], s[3], s[4], s[5], s[6]);
                break;
            }
        }
                break;
            }
        }
@@ -488,10 +488,10 @@ struct sockaddr_ns *sns;
        net.net_e  = work.x_net;
        if (ns_nullhost(work) && net.long_e == 0) {
                if (port ) {
        net.net_e  = work.x_net;
        if (ns_nullhost(work) && net.long_e == 0) {
                if (port ) {
-                       sprintf(mybuf, "*.%xH", port);
+                       (void)sprintf(mybuf, "*.%xH", port);
                        upHex(mybuf);
                } else
                        upHex(mybuf);
                } else
-                       sprintf(mybuf, "*.*");
+                       (void)sprintf(mybuf, "*.*");
                return (mybuf);
        }
 
                return (mybuf);
        }
 
@@ -501,17 +501,17 @@ struct sockaddr_ns *sns;
                host = "*";
        } else {
                q = work.x_host.c_host;
                host = "*";
        } else {
                q = work.x_host.c_host;
-               sprintf(chost, "%02x%02x%02x%02x%02x%02xH",
+               (void)sprintf(chost, "%02x%02x%02x%02x%02x%02xH",
                        q[0], q[1], q[2], q[3], q[4], q[5]);
                for (p = chost; *p == '0' && p < chost + 12; p++);
                host = p;
        }
        if (port)
                        q[0], q[1], q[2], q[3], q[4], q[5]);
                for (p = chost; *p == '0' && p < chost + 12; p++);
                host = p;
        }
        if (port)
-               sprintf(cport, ".%xH", htons(port));
+               (void)sprintf(cport, ".%xH", htons(port));
        else
                *cport = 0;
 
        else
                *cport = 0;
 
-       sprintf(mybuf,"%xH.%s%s", ntohl(net.long_e), host, cport);
+       (void)sprintf(mybuf,"%xH.%s%s", ntohl(net.long_e), host, cport);
        upHex(mybuf);
        return(mybuf);
 }
        upHex(mybuf);
        return(mybuf);
 }
index 8ff5ca7..340d382 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)savecore.c 5.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)savecore.c 5.13 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -377,7 +377,7 @@ save_core()
        ifd = Open(ddname, O_RDONLY);
        Lseek(ifd, (off_t)(dumplo + ok(dump_nl[X_DUMPSIZE].n_value)), L_SET);
        Read(ifd, (char *)&dumpsize, sizeof (dumpsize));
        ifd = Open(ddname, O_RDONLY);
        Lseek(ifd, (off_t)(dumplo + ok(dump_nl[X_DUMPSIZE].n_value)), L_SET);
        Read(ifd, (char *)&dumpsize, sizeof (dumpsize));
-       sprintf(cp, "vmcore.%d", bounds);
+       (void)sprintf(cp, "vmcore.%d", bounds);
        ofd = Create(path(cp), 0644);
        Lseek(ifd, (off_t)dumplo, L_SET);
        log(LOG_NOTICE, "Saving %d bytes of image in vmcore.%d\n",
        ofd = Create(path(cp), 0644);
        Lseek(ifd, (off_t)dumplo, L_SET);
        log(LOG_NOTICE, "Saving %d bytes of image in vmcore.%d\n",
index 44e1379..e341616 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)tunefs.c   5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)tunefs.c   5.5 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -45,7 +45,6 @@ main(argc, argv)
        int Aflag = 0;
        struct fstab *fs;
        char *chg[2], device[MAXPATHLEN];
        int Aflag = 0;
        struct fstab *fs;
        char *chg[2], device[MAXPATHLEN];
-       extern char *sprintf();
 
        argc--, argv++; 
        if (argc < 2)
 
        argc--, argv++; 
        if (argc < 2)
@@ -59,7 +58,8 @@ again:
                if (*special != '/') {
                        if (*special == 'r')
                                special++;
                if (*special != '/') {
                        if (*special == 'r')
                                special++;
-                       special = sprintf(device, "/dev/%s", special);
+                       (void)sprintf(device, "/dev/%s", special);
+                       special = device;
                        goto again;
                }
                fprintf(stderr, "tunefs: "); perror(special);
                        goto again;
                }
                fprintf(stderr, "tunefs: "); perror(special);
index 7e4de37..53291c4 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)fstat.c    5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)fstat.c    5.4 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -517,9 +517,11 @@ struct socket *sock;
        if (dom.dom_family == AF_INET)  
                strcpy(dname, "inet");
 
        if (dom.dom_family == AF_INET)  
                strcpy(dname, "inet");
 
-       if (so.so_type < 1 || so.so_type > STYPEMAX)
-               stype = (char *)sprintf(emalloc(10),"unk%d", so.so_type);
-       else
+       if (so.so_type < 1 || so.so_type > STYPEMAX) {
+               
+               stype = emalloc(10);
+               (void)sprintf(stype,"unk%d", so.so_type);
+       } else
                stype = stypename[so.so_type];
 
        /* print sock type, sock state, and domain name */
                stype = stypename[so.so_type];
 
        /* print sock type, sock state, and domain name */
@@ -585,6 +587,8 @@ struct socket *sock;
 char *
 getinetproto(number)
 {
 char *
 getinetproto(number)
 {
+       char    *cp;
+
        switch(number) {
        case 0:  return("ip");
        case 1:  return("icmp");
        switch(number) {
        case 0:  return("ip");
        case 1:  return("icmp");
@@ -595,7 +599,9 @@ getinetproto(number)
        case 17: return("udp");
        case 22: return("idp");
        case 255: return("raw");
        case 17: return("udp");
        case 22: return("idp");
        case 255: return("raw");
-       default: return((char *)sprintf(emalloc(16),"%d",number));
+       default:
+               (void)sprintf(emalloc(16),"%d",number);
+               return(cp);
        }
 }
                
        }
 }
                
index 1695dec..542baa1 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)bad144.c   5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)bad144.c   5.11 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -107,7 +107,7 @@ usage:
                exit(1);
        }
        if (argv[0][0] != '/')
                exit(1);
        }
        if (argv[0][0] != '/')
-               sprintf(name, "/dev/r%s%s", argv[0], RAWPART);
+               (void)sprintf(name, "/dev/r%s%s", argv[0], RAWPART);
        else
                strcpy(name, argv[0]);
        f = open(name, argc == 1? O_RDONLY : O_RDWR);
        else
                strcpy(name, argv[0]);
        f = open(name, argc == 1? O_RDONLY : O_RDWR);
index d92a329..8c82726 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)config.h    5.4 (Berkeley) %G%
+ *     @(#)config.h    5.5 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -134,7 +134,6 @@ char        *rindex();
 char   *malloc();
 char   *strcpy();
 char   *strcat();
 char   *malloc();
 char   *strcpy();
 char   *strcat();
-char   *sprintf();
 
 #if MACHINE_VAX
 int    seen_mba, seen_uba;
 
 #if MACHINE_VAX
 int    seen_mba, seen_uba;
index 4b6f7f5..a12fbfd 100644 (file)
@@ -70,7 +70,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)config.y    5.4 (Berkeley) %G%
+ *     @(#)config.y    5.5 (Berkeley) %G%
  */
 
 #include "config.h"
  */
 
 #include "config.h"
@@ -347,7 +347,11 @@ Opt_value:
        ID
              = { $$ = val_id = ns($1); } |
        NUMBER
        ID
              = { $$ = val_id = ns($1); } |
        NUMBER
-             = { char nb[16]; $$ = val_id = ns(sprintf(nb, "%d", $1)); };
+             = {
+               char nb[16];
+               (void) sprintf(nb, "%d", $1);
+               $$ = val_id = ns(nb);
+             } ;
 
 
 Save_id:
 
 
 Save_id:
@@ -431,9 +435,11 @@ Dev_info:
 Con_info:
        AT Dev NUMBER
              = {
 Con_info:
        AT Dev NUMBER
              = {
-               if (eq(cur.d_name, "mba") || eq(cur.d_name, "uba"))
-                       yyerror(sprintf(errbuf,
-                           "%s must be connected to a nexus", cur.d_name));
+               if (eq(cur.d_name, "mba") || eq(cur.d_name, "uba")) {
+                       (void) sprintf(errbuf,
+                               "%s must be connected to a nexus", cur.d_name);
+                       yyerror(errbuf);
+               }
                cur.d_conn = connect($2, $3);
                } |
        AT NEXUS NUMBER
                cur.d_conn = connect($2, $3);
                } |
        AT NEXUS NUMBER
@@ -615,13 +621,15 @@ connect(dev, num)
                if ((num != dp->d_unit) || !eq(dev, dp->d_name))
                        continue;
                if (dp->d_type != CONTROLLER && dp->d_type != MASTER) {
                if ((num != dp->d_unit) || !eq(dev, dp->d_name))
                        continue;
                if (dp->d_type != CONTROLLER && dp->d_type != MASTER) {
-                       yyerror(sprintf(errbuf,
-                           "%s connected to non-controller", dev));
+                       (void) sprintf(errbuf,
+                           "%s connected to non-controller", dev);
+                       yyerror(errbuf);
                        return (0);
                }
                return (dp);
        }
                        return (0);
                }
                return (dp);
        }
-       yyerror(sprintf(errbuf, "%s %d not defined", dev, num));
+       (void) sprintf(errbuf, "%s %d not defined", dev, num);
+       yyerror(errbuf);
        return (0);
 }
 
        return (0);
 }
 
@@ -643,7 +651,8 @@ huhcon(dev)
                if (eq(dp->d_name, dev))
                        break;
        if (dp == 0) {
                if (eq(dp->d_name, dev))
                        break;
        if (dp == 0) {
-               yyerror(sprintf(errbuf, "no %s's to wildcard", dev));
+               (void) sprintf(errbuf, "no %s's to wildcard", dev);
+               yyerror(errbuf);
                return (0);
        }
        oldtype = dp->d_type;
                return (0);
        }
        oldtype = dp->d_type;
@@ -764,7 +773,7 @@ checksystemspec(fl)
                swap = newswap();
                dev = fl->f_rootdev;
                if (minor(dev) & 07) {
                swap = newswap();
                dev = fl->f_rootdev;
                if (minor(dev) & 07) {
-                       sprintf(buf, 
+                       (void) sprintf(buf, 
 "Warning, swap defaulted to 'b' partition with root on '%c' partition",
                                (minor(dev) & 07) + 'a');
                        yyerror(buf);
 "Warning, swap defaulted to 'b' partition with root on '%c' partition",
                                (minor(dev) & 07) + 'a');
                        yyerror(buf);
@@ -806,7 +815,7 @@ checksystemspec(fl)
                for (; p && p->f_type == SWAPSPEC; p = p->f_next)
                        if (fl->f_dumpdev == p->f_swapdev)
                                return;
                for (; p && p->f_type == SWAPSPEC; p = p->f_next)
                        if (fl->f_dumpdev == p->f_swapdev)
                                return;
-               sprintf(buf, "Warning, orphaned dump device, %s",
+               (void) sprintf(buf, "Warning, orphaned dump device, %s",
                        "do you know what you're doing");
                yyerror(buf);
        }
                        "do you know what you're doing");
                yyerror(buf);
        }
index d72ac93..4cb3e36 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.5 (Berkeley) %G%";
 #endif not lint
 
 #include <stdio.h>
 #endif not lint
 
 #include <stdio.h>
@@ -70,7 +70,7 @@ main(argc, argv)
        char xxx[80];
 
        (void) symlink("../h", path("sys"));    
        char xxx[80];
 
        (void) symlink("../h", path("sys"));    
-       sprintf(xxx, "../%s", machinename);
+       (void) sprintf(xxx, "../%s", machinename);
        (void) symlink(xxx, path("machine"));
        }
        makefile();                     /* build Makefile */
        (void) symlink(xxx, path("machine"));
        }
        makefile();                     /* build Makefile */
index cf854ca..e1ea4e3 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mkioconf.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkioconf.c 5.6 (Berkeley) %G%";
 #endif not lint
 
 #include <stdio.h>
 #endif not lint
 
 #include <stdio.h>
@@ -444,7 +444,8 @@ intv(dev)
 
        if (dev->d_vec == 0)
                return ("     0");
 
        if (dev->d_vec == 0)
                return ("     0");
-       return (sprintf(buf, "%sint%d", dev->d_name, dev->d_unit));
+       (void) sprintf(buf, "%sint%d", dev->d_name, dev->d_unit);
+       return (buf);
 }
 
 char *
 }
 
 char *
@@ -455,5 +456,6 @@ qu(num)
                return ("'?'");
        if (num == UNKNOWN)
                return (" -1");
                return ("'?'");
        if (num == UNKNOWN)
                return (" -1");
-       return (sprintf(errbuf, "%3d", num));
+       (void) sprintf(errbuf, "%3d", num);
+       return (errbuf);
 }
 }
index 1893642..38836fb 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mkmakefile.c       5.18 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkmakefile.c       5.19 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -388,7 +388,7 @@ do_objs(fp)
                for (fl = conf_list; fl; fl = fl->f_next) {
                        if (fl->f_type != SWAPSPEC)
                                continue;
                for (fl = conf_list; fl; fl = fl->f_next) {
                        if (fl->f_type != SWAPSPEC)
                                continue;
-                       sprintf(swapname, "swap%s.c", fl->f_fn);
+                       (void) sprintf(swapname, "swap%s.c", fl->f_fn);
                        if (eq(sp, swapname))
                                goto cont;
                }
                        if (eq(sp, swapname))
                                goto cont;
                }
@@ -432,7 +432,7 @@ do_cfiles(fp)
                }
        for (fl = conf_list; fl; fl = fl->f_next)
                if (fl->f_type == SYSTEMSPEC) {
                }
        for (fl = conf_list; fl; fl = fl->f_next)
                if (fl->f_type == SYSTEMSPEC) {
-                       sprintf(swapname, "swap%s.c", fl->f_fn);
+                       (void) sprintf(swapname, "swap%s.c", fl->f_fn);
                        if ((len = 3 + strlen(swapname)) + lpos > 72) {
                                lpos = 8;
                                fputs("\\\n\t", fp);
                        if ((len = 3 + strlen(swapname)) + lpos > 72) {
                                lpos = 8;
                                fputs("\\\n\t", fp);
index 0b29489..0baf147 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mkswapconf.c       5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkswapconf.c       5.2 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -160,7 +160,7 @@ devtoname(dev)
                        break;
        if (dp == 0)
                dp = devtable;
                        break;
        if (dp == 0)
                dp = devtable;
-       sprintf(buf, "%s%d%c", dp->dev_name,
+       (void) sprintf(buf, "%s%d%c", dp->dev_name,
                minor(dev) >> 3, (minor(dev) & 07) + 'a');
        return (ns(buf));
 }
                minor(dev) >> 3, (minor(dev) & 07) + 'a');
        return (ns(buf));
 }
@@ -172,7 +172,7 @@ initdevtable()
        register struct devdescription **dp = &devtable;
        FILE *fp;
 
        register struct devdescription **dp = &devtable;
        FILE *fp;
 
-       sprintf(buf, "../conf/devices.%s", machinename);
+       (void) sprintf(buf, "../conf/devices.%s", machinename);
        fp = fopen(buf, "r");
        if (fp == NULL) {
                fprintf(stderr, "config: can't open %s\n", buf);
        fp = fopen(buf, "r");
        if (fp == NULL) {
                fprintf(stderr, "config: can't open %s\n", buf);
index 6548aaa..f6e09d9 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)inetd.c    5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)inetd.c    5.11 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -696,9 +696,9 @@ setproctitle(a, s)
        cp = Argv[0];
        size = sizeof(sin);
        if (getpeername(s, &sin, &size) == 0)
        cp = Argv[0];
        size = sizeof(sin);
        if (getpeername(s, &sin, &size) == 0)
-               sprintf(buf, "-%s [%s]", a, inet_ntoa(sin.sin_addr)); 
+               (void) sprintf(buf, "-%s [%s]", a, inet_ntoa(sin.sin_addr)); 
        else
        else
-               sprintf(buf, "-%s", a); 
+               (void) sprintf(buf, "-%s", a); 
        strncpy(cp, buf, LastArg - cp);
        cp += strlen(cp);
        while (cp < LastArg)
        strncpy(cp, buf, LastArg - cp);
        cp += strlen(cp);
        while (cp < LastArg)
@@ -905,7 +905,7 @@ daytime_stream(s, sep)              /* Return human-readable time of day */
 
        clock = time((time_t *) 0);
 
 
        clock = time((time_t *) 0);
 
-       sprintf(buffer, "%.24s\r\n", ctime(&clock));
+       (void) sprintf(buffer, "%.24s\r\n", ctime(&clock));
        (void) write(s, buffer, strlen(buffer));
 }
 
        (void) write(s, buffer, strlen(buffer));
 }
 
@@ -925,7 +925,7 @@ daytime_dg(s, sep)          /* Return human-readable time of day */
        size = sizeof(sa);
        if (recvfrom(s, buffer, sizeof(buffer), 0, &sa, &size) < 0)
                return;
        size = sizeof(sa);
        if (recvfrom(s, buffer, sizeof(buffer), 0, &sa, &size) < 0)
                return;
-       sprintf(buffer, "%.24s\r\n", ctime(&clock));
+       (void) sprintf(buffer, "%.24s\r\n", ctime(&clock));
        (void) sendto(s, buffer, strlen(buffer), 0, &sa, sizeof(sa));
 }
 
        (void) sendto(s, buffer, strlen(buffer), 0, &sa, sizeof(sa));
 }
 
index 15d967e..eb1a89a 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)quot.c      4.12 (Berkeley) 87/02/23";
+static char *sccsid = "@(#)quot.c      4.13 (Berkeley) 87/10/22";
 #endif
 
 /*
 #endif
 
 /*
@@ -111,7 +111,7 @@ quotall()
                cp = rindex(fs->fs_spec, '/');
                if (cp == 0)
                        continue;
                cp = rindex(fs->fs_spec, '/');
                if (cp == 0)
                        continue;
-               sprintf(dev, "/dev/r%s", cp + 1);
+               (void)sprintf(dev, "/dev/r%s", cp + 1);
                if (check(dev, fs->fs_file) == 0)
                        report();
        }
                if (check(dev, fs->fs_file) == 0)
                        report();
        }
index 4de762a..656676f 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)rmt.c      5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)rmt.c      5.3 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -38,7 +38,6 @@ extern        errno;
 char   *sys_errlist[];
 char   resp[BUFSIZ];
 
 char   *sys_errlist[];
 char   resp[BUFSIZ];
 
-char   *sprintf();
 long   lseek();
 
 FILE   *debug;
 long   lseek();
 
 FILE   *debug;
index 4f2a205..24a069a 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)rwhod.c    5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)rwhod.c    5.10 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/types.h>
 #endif not lint
 
 #include <sys/types.h>
@@ -76,7 +76,7 @@ int   s, utmpf, kmemf = -1;
 #define        RWHODIR         "/usr/spool/rwho"
 
 int    onalrm();
 #define        RWHODIR         "/usr/spool/rwho"
 
 int    onalrm();
-char   *strcpy(), *sprintf(), *malloc();
+char   *strcpy(), *malloc();
 long   lseek();
 int    getkmem();
 struct in_addr inet_makeaddr();
 long   lseek();
 int    getkmem();
 struct in_addr inet_makeaddr();
index 684faa6..9e65ff0 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)sa.c        4.9 (Berkeley) %G%";
+static char *sccsid = "@(#)sa.c        4.10 (Berkeley) %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -953,7 +953,7 @@ char *
 makekey(uid)
        int uid;
 {
 makekey(uid)
        int uid;
 {
-       sprintf(UserKey+1, "%04x", uid);
+       (void)sprintf(UserKey+1, "%04x", uid);
        UserKey[0] = USERKEY;
        return(UserKey);
 }
        UserKey[0] = USERKEY;
        return(UserKey);
 }