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:
-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>
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
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
-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>
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;
-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>
/* 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,
#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>
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();
-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>
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)
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++;
-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 */
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];
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];
#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%";
* 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;
} 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;
}
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;
}
} 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;
}
} 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;
}
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);
#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%";
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);
}
#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>
- 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: ");
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);
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]);
- sprintf(tempname, "%s.new.dir", argv[1]);
+ (void)sprintf(tempname, "%s.new.dir", argv[1]);
unlink(tempname);
exit(1);
}
unlink(tempname);
exit(1);
}
-static char sccsid[] = "@(#)trace.c 5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)trace.c 5.7 (Berkeley) %G%";
{
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));
- 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],
-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
char *dkname;
char *specname;
char tmpfil[] = "/tmp/EdDk.aXXXXXX";
char *dkname;
char *specname;
char tmpfil[] = "/tmp/EdDk.aXXXXXX";
extern int errno;
char namebuf[BBSIZE], *np = namebuf;
extern int errno;
char namebuf[BBSIZE], *np = namebuf;
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);
}
*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;
}
-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>
- 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));
}
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;
- 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"));
- sprintf(line, "W%d\n", count);
+ (void)sprintf(line, "W%d\n", count);
write(rmtape, line, strlen(line));
}
write(rmtape, line, strlen(line));
}
- 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));
}
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));
}
-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>
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;
-static char sccsid[] = "@(#)icheck.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)icheck.c 5.3 (Berkeley) %G%";
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;
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;
}
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++;
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++;
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++;
#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%";
extern int errno;
char *index();
char *rindex();
extern int errno;
char *index();
char *rindex();
main(argc, argv)
int argc;
main(argc, argv)
int argc;
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) {
#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%";
- 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));
#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>
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;
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]);
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;
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]);
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);
+ (void)sprintf(mybuf, "*.*");
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));
- 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);
}
#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%";
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",
#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%";
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)
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);
#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%";
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 */
char *
getinetproto(number)
{
char *
getinetproto(number)
{
switch(number) {
case 0: return("ip");
case 1: return("icmp");
switch(number) {
case 0: return("ip");
case 1: return("icmp");
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);
#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%";
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);
* 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%
char *malloc();
char *strcpy();
char *strcat();
char *malloc();
char *strcpy();
char *strcat();
#if MACHINE_VAX
int seen_mba, seen_uba;
#if MACHINE_VAX
int seen_mba, seen_uba;
* 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%
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);
+ } ;
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
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);
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;
swap = newswap();
dev = fl->f_rootdev;
if (minor(dev) & 07) {
swap = newswap();
dev = fl->f_rootdev;
if (minor(dev) & 07) {
"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);
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);
}
#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>
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 */
-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>
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);
return ("'?'");
if (num == UNKNOWN)
return (" -1");
return ("'?'");
if (num == UNKNOWN)
return (" -1");
- return (sprintf(errbuf, "%3d", num));
+ (void) sprintf(errbuf, "%3d", num);
+ return (errbuf);
-static char sccsid[] = "@(#)mkmakefile.c 5.18 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkmakefile.c 5.19 (Berkeley) %G%";
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;
}
}
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);
-static char sccsid[] = "@(#)mkswapconf.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkswapconf.c 5.2 (Berkeley) %G%";
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));
}
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);
#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%";
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));
- 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)
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));
}
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));
}
-static char *sccsid = "@(#)quot.c 4.12 (Berkeley) 87/02/23";
+static char *sccsid = "@(#)quot.c 4.13 (Berkeley) 87/10/22";
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();
}
#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%";
char *sys_errlist[];
char resp[BUFSIZ];
char *sys_errlist[];
char resp[BUFSIZ];
long lseek();
FILE *debug;
long lseek();
FILE *debug;
#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>
#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();
-static char *sccsid = "@(#)sa.c 4.9 (Berkeley) %G%";
+static char *sccsid = "@(#)sa.c 4.10 (Berkeley) %G%";
- sprintf(UserKey+1, "%04x", uid);
+ (void)sprintf(UserKey+1, "%04x", uid);
UserKey[0] = USERKEY;
return(UserKey);
}
UserKey[0] = USERKEY;
return(UserKey);
}