summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-09-14 22:33:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-09-14 22:33:39 +0000
commitaea4b85fb37df68d537c653645d4ae1f5fe778ab (patch)
tree10dc176082f9bc4c3642c1aa10475f2ec7579a8c
parenta5ac45ca202f542b14764443c63374e698e729e0 (diff)
remove unused variables
-rw-r--r--usr.sbin/pstat/pstat.c13
-rw-r--r--usr.sbin/syslogc/syslogc.c4
2 files changed, 8 insertions, 9 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index c5b91596316..82ba870ec20 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -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",
diff --git a/usr.sbin/syslogc/syslogc.c b/usr.sbin/syslogc/syslogc.c
index 80619370734..80a3d0997a6 100644
--- a/usr.sbin/syslogc/syslogc.c
+++ b/usr.sbin/syslogc/syslogc.c
@@ -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));