This commit is contained in:
mycroft 1998-07-28 05:15:46 +00:00
parent 49b1e89cfe
commit 1381f68431
7 changed files with 41 additions and 40 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: conv.c,v 1.7 1997/07/20 21:58:37 christos Exp $ */
/* $NetBSD: conv.c,v 1.8 1998/07/28 05:15:46 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)conv.c 8.3 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: conv.c,v 1.7 1997/07/20 21:58:37 christos Exp $");
__RCSID("$NetBSD: conv.c,v 1.8 1998/07/28 05:15:46 mycroft Exp $");
#endif
#endif /* not lint */
@ -162,7 +162,7 @@ block()
* input block.
*/
if (ch != '\n' && in.dbcnt < cbsz) {
memmove(in.db, in.dbp - in.dbcnt, in.dbcnt);
(void)memmove(in.db, in.dbp - in.dbcnt, in.dbcnt);
break;
}
@ -212,7 +212,7 @@ block_close()
*/
if (in.dbcnt) {
++st.trunc;
memmove(out.dbp, in.dbp - in.dbcnt, in.dbcnt);
(void)memmove(out.dbp, in.dbp - in.dbcnt, in.dbcnt);
(void)memset(out.dbp + in.dbcnt,
ctab ? ctab[' '] : ' ', cbsz - in.dbcnt);
out.dbcnt += cbsz;
@ -246,7 +246,7 @@ unblock()
for (t = inp + cbsz - 1; t >= inp && *t == ' '; --t);
if (t >= inp) {
cnt = t - inp + 1;
memmove(out.dbp, inp, cnt);
(void)memmove(out.dbp, inp, cnt);
out.dbp += cnt;
out.dbcnt += cnt;
}
@ -256,7 +256,7 @@ unblock()
dd_out(0);
}
if (in.dbcnt)
memmove(in.db, in.dbp - in.dbcnt, in.dbcnt);
(void)memmove(in.db, in.dbp - in.dbcnt, in.dbcnt);
in.dbp = in.db + in.dbcnt;
}
@ -271,7 +271,7 @@ unblock_close()
for (t = in.db + in.dbcnt - 1; t >= in.db && *t == ' '; --t);
if (t >= in.db) {
cnt = t - in.db + 1;
memmove(out.dbp, in.db, cnt);
(void)memmove(out.dbp, in.db, cnt);
out.dbp += cnt;
out.dbcnt += cnt;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dd.c,v 1.9 1998/06/29 19:49:04 gwr Exp $ */
/* $NetBSD: dd.c,v 1.10 1998/07/28 05:15:46 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)dd.c 8.5 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: dd.c,v 1.9 1998/06/29 19:49:04 gwr Exp $");
__RCSID("$NetBSD: dd.c,v 1.10 1998/07/28 05:15:46 mycroft Exp $");
#endif
#endif /* not lint */
@ -97,7 +97,7 @@ main(argc, argv)
(void)signal(SIGINFO, summaryx);
(void)signal(SIGINT, terminate);
atexit(summary);
(void)atexit(summary);
while (files_cnt--)
dd_in();
@ -244,9 +244,9 @@ dd_in()
*/
if (flags & C_SYNC)
if (flags & (C_BLOCK|C_UNBLOCK))
memset(in.dbp, ' ', in.dbsz);
(void)memset(in.dbp, ' ', in.dbsz);
else
memset(in.dbp, 0, in.dbsz);
(void)memset(in.dbp, 0, in.dbsz);
n = read(in.fd, in.dbp, in.dbsz);
if (n == 0) {
@ -337,7 +337,7 @@ dd_close()
else if (cfunc == unblock)
unblock_close();
if (ddflags & C_OSYNC && out.dbcnt < out.dbsz) {
memset(out.dbp, 0, out.dbsz - out.dbcnt);
(void)memset(out.dbp, 0, out.dbsz - out.dbcnt);
out.dbcnt = out.dbsz;
}
if (out.dbcnt)
@ -405,6 +405,6 @@ dd_out(force)
/* Reassemble the output block. */
if (out.dbcnt)
memmove(out.db, out.dbp - out.dbcnt, out.dbcnt);
(void)memmove(out.db, out.dbp - out.dbcnt, out.dbcnt);
out.dbp = out.db + out.dbcnt;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: domainname.c,v 1.9 1997/11/05 21:20:16 cgd Exp $ */
/* $NetBSD: domainname.c,v 1.10 1998/07/28 05:15:46 mycroft Exp $ */
/*
* Copyright (c) 1988, 1993
@ -35,8 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
__COPYRIGHT(
"@(#) Copyright (c) 1988, 1993\n\
__COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n");
#endif /* not lint */
@ -44,7 +43,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)hostname.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: domainname.c,v 1.9 1997/11/05 21:20:16 cgd Exp $");
__RCSID("$NetBSD: domainname.c,v 1.10 1998/07/28 05:15:46 mycroft Exp $");
#endif
#endif /* not lint */
@ -56,8 +55,8 @@ __RCSID("$NetBSD: domainname.c,v 1.9 1997/11/05 21:20:16 cgd Exp $");
#include <string.h>
#include <unistd.h>
int main __P((int, char *[]));
void usage __P((void));
int main __P((int, char *[]));
int
main(argc, argv)
@ -80,7 +79,7 @@ main(argc, argv)
usage();
if (*argv) {
if (setdomainname(*argv, (int)strlen(*argv)))
if (setdomainname(*argv, strlen(*argv)))
err(1, "setdomainname");
} else {
if (getdomainname(domainname, sizeof(domainname)))

View File

@ -1,4 +1,4 @@
/* $NetBSD: expr.c,v 1.7 1998/07/27 17:55:17 mycroft Exp $ */
/* $NetBSD: expr.c,v 1.8 1998/07/28 05:15:46 mycroft Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
@ -284,7 +284,7 @@ eval5()
/* compile regular expression */
if ((eval = regcomp(&rp, r->u.s, 0)) != 0) {
regerror(eval, &rp, errbuf, sizeof(errbuf));
(void)regerror(eval, &rp, errbuf, sizeof(errbuf));
errx(2, "%s", errbuf);
}
@ -544,9 +544,10 @@ main(argc, argv)
}
if (vp->type == integer)
printf("%d\n", vp->u.i);
(void)printf("%d\n", vp->u.i);
else
printf("%s\n", vp->u.s);
(void)printf("%s\n", vp->u.s);
exit(is_zero_or_null(vp));
/* NOTREACHED */
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kill.c,v 1.13 1997/07/20 17:36:22 christos Exp $ */
/* $NetBSD: kill.c,v 1.14 1998/07/28 05:15:47 mycroft Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)kill.c 8.4 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: kill.c,v 1.13 1997/07/20 17:36:22 christos Exp $");
__RCSID("$NetBSD: kill.c,v 1.14 1998/07/28 05:15:47 mycroft Exp $");
#endif
#endif /* not lint */
@ -89,7 +89,7 @@ main(argc, argv)
numsig -= 128;
if (numsig <= 0 || numsig >= NSIG)
nosig(*argv);
printf("%s\n", sys_signame[numsig]);
(void)printf("%s\n", sys_signame[numsig]);
exit(0);
}
printsignals(stdout);
@ -139,6 +139,7 @@ main(argc, argv)
}
exit(errors);
/* NOTREACHED */
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: ls.c,v 1.28 1998/07/27 17:55:17 mycroft Exp $ */
/* $NetBSD: ls.c,v 1.29 1998/07/28 05:15:47 mycroft Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)ls.c 8.7 (Berkeley) 8/5/94";
#else
__RCSID("$NetBSD: ls.c,v 1.28 1998/07/27 17:55:17 mycroft Exp $");
__RCSID("$NetBSD: ls.c,v 1.29 1998/07/28 05:15:47 mycroft Exp $");
#endif
#endif /* not lint */
@ -478,10 +478,10 @@ display(p, list)
btotal += sp->st_blocks;
if (f_longform) {
if (f_numericonly) {
snprintf(nuser, sizeof(nuser), "%u",
sp->st_uid);
snprintf(ngroup, sizeof(ngroup), "%u",
sp->st_gid);
(void)snprintf(nuser, sizeof(nuser),
"%u", sp->st_uid);
(void)snprintf(ngroup, sizeof(ngroup),
"%u", sp->st_gid);
user = nuser;
group = ngroup;
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: print.c,v 1.21 1998/05/16 15:12:26 lukem Exp $ */
/* $NetBSD: print.c,v 1.22 1998/07/28 05:15:47 mycroft Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.5 (Berkeley) 7/28/94";
#else
__RCSID("$NetBSD: print.c,v 1.21 1998/05/16 15:12:26 lukem Exp $");
__RCSID("$NetBSD: print.c,v 1.22 1998/07/28 05:15:47 mycroft Exp $");
#endif
#endif /* not lint */
@ -96,7 +96,7 @@ printlong(dp)
NAMES *np;
char buf[20];
time(&now);
now = time(NULL);
if (dp->list->fts_level != FTS_ROOTLEVEL && (f_longform || f_size))
(void)printf("total %qu\n",
@ -198,7 +198,7 @@ printcol(dp)
if ((base += numrows) >= num)
break;
while (chcnt++ < colwidth)
putchar(' ');
(void)putchar(' ');
}
(void)putchar('\n');
}
@ -240,14 +240,14 @@ printacol(dp)
continue;
if (col >= numcols) {
chcnt = col = 0;
putchar('\n');
(void)putchar('\n');
}
chcnt = printaname(p, dp->s_inode, dp->s_block);
while (chcnt++ < colwidth)
putchar(' ');
(void)putchar(' ');
col++;
}
putchar('\n');
(void)putchar('\n');
}
/*