1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00

remove unused variables

This commit is contained in:
deraadt 2004-09-14 22:33:00 +00:00
parent f6915823c3
commit c32bf39006
2 changed files with 8 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: pstat.c,v 1.47 2004/08/03 04:11:49 mjc Exp $ */
/* $OpenBSD: pstat.c,v 1.48 2004/09/14 22:33:00 deraadt Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@ -40,7 +40,7 @@ static char copyright[] =
#if 0
from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94";
#else
static char *rcsid = "$OpenBSD: pstat.c,v 1.47 2004/08/03 04:11:49 mjc Exp $";
static char *rcsid = "$OpenBSD: pstat.c,v 1.48 2004/09/14 22:33:00 deraadt Exp $";
#endif
#endif /* not lint */
@ -144,7 +144,7 @@ main(int argc, char *argv[])
{
int fileflag = 0, swapflag = 0, ttyflag = 0, vnodeflag = 0;
char buf[_POSIX2_LINE_MAX];
int ch, ret;
int ch;
extern char *optarg;
extern int optind;
@ -201,7 +201,7 @@ main(int argc, char *argv[])
(void)setgid(getgid());
if (vnodeflag)
if ((ret = kvm_nlist(kd, nl)) == -1)
if (kvm_nlist(kd, nl) == -1)
errx(1, "kvm_nlist: %s", kvm_geterr(kd));
if (!(fileflag | vnodeflag | ttyflag | swapflag | totalflag))
@ -972,7 +972,7 @@ void
swapmode(void)
{
char *header;
int hlen = 10, nswap, rnswap;
int hlen = 10, nswap;
int div, i, avail, nfree, npfree, used;
long blocksize;
struct swapent *swdev;
@ -996,7 +996,8 @@ swapmode(void)
}
if ((swdev = malloc(nswap * sizeof(*swdev))) == NULL)
err(1, "malloc");
rnswap = swapctl(SWAP_STATS, swdev, nswap);
if (swapctl(SWAP_STATS, swdev, nswap) == -1)
err(1, "swapctl");
if (!totalflag)
(void)printf("%-11s %*s %8s %8s %8s %s\n",

View File

@ -1,4 +1,4 @@
/* $OpenBSD: syslogc.c,v 1.7 2004/07/15 20:46:00 mpf Exp $ */
/* $OpenBSD: syslogc.c,v 1.8 2004/09/14 22:33:38 deraadt Exp $ */
/*
* Copyright (c) 2004 Damien Miller
@ -75,14 +75,12 @@ main(int argc, char **argv)
const char *ctlsock_path;
char buf[8192];
struct sockaddr_un ctl;
socklen_t ctllen;
int ctlsock, ch, oflag, rval;
FILE *ctlf;
extern char *optarg;
extern int optind;
struct ctl_cmd cc;
struct ctl_reply_hdr rr;
u_int32_t header[2];
memset(&cc, '\0', sizeof(cc));