summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2008-09-15 21:46:02 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2008-09-15 21:46:02 +0000
commit7fde72f66b65a8084625ffb1727f3d307c7a17e2 (patch)
tree6ba6f415c4fe70008205e556b504db85d6825e78
parentad65b84ef51e31513ab97bf4e4fd8a623ee1f4e9 (diff)
remove dead stores and newly created unused variables.
Found by LLVM/Clang Static Analyzer. ok mpf@ looks good mk@ ok henning@
-rw-r--r--sys/netinet/ip_ah.c7
-rw-r--r--sys/netinet/ip_ipcomp.c6
-rw-r--r--sys/netinet/ip_ipsp.c8
-rw-r--r--sys/netinet/ip_mroute.c3
4 files changed, 5 insertions, 19 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c
index 31d9c25bcff..0ea057e42bf 100644
--- a/sys/netinet/ip_ah.c
+++ b/sys/netinet/ip_ah.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah.c,v 1.91 2007/10/17 20:01:26 hshoexer Exp $ */
+/* $OpenBSD: ip_ah.c,v 1.92 2008/09/15 21:46:01 chl Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -736,7 +736,6 @@ ah_input_cb(void *op)
int s, roff, rplen, error, skip, protoff;
unsigned char calc[AH_ALEN_MAX];
struct mbuf *m1, *m0, *m;
- struct cryptodesc *crd;
struct auth_hash *ahx;
struct tdb_crypto *tc;
struct cryptop *crp;
@@ -747,7 +746,6 @@ ah_input_cb(void *op)
caddr_t ptr;
crp = (struct cryptop *) op;
- crd = crp->crp_desc;
tc = (struct tdb_crypto *) crp->crp_opaque;
skip = tc->tc_skip;
@@ -1261,7 +1259,7 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
int
ah_output_cb(void *op)
{
- int skip, protoff, error;
+ int skip, error;
struct tdb_crypto *tc;
struct cryptop *crp;
struct tdb *tdb;
@@ -1272,7 +1270,6 @@ ah_output_cb(void *op)
crp = (struct cryptop *) op;
tc = (struct tdb_crypto *) crp->crp_opaque;
skip = tc->tc_skip;
- protoff = tc->tc_protoff;
ptr = (caddr_t) (tc + 1);
m = (struct mbuf *) crp->crp_buf;
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c
index 2af0d22e61f..f77c5d23dae 100644
--- a/sys/netinet/ip_ipcomp.c
+++ b/sys/netinet/ip_ipcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipcomp.c,v 1.22 2007/10/06 02:18:38 krw Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.23 2008/09/15 21:46:01 chl Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -210,8 +210,6 @@ ipcomp_input_cb(op)
int error, s, skip, protoff, roff, hlen = IPCOMP_HLENGTH, clen;
u_int8_t nproto;
struct mbuf *m, *m1, *mo;
- struct cryptodesc *crd;
- struct comp_algo *ipcompx;
struct tdb_crypto *tc;
struct cryptop *crp;
struct tdb *tdb;
@@ -219,7 +217,6 @@ ipcomp_input_cb(op)
caddr_t addr;
crp = (struct cryptop *) op;
- crd = crp->crp_desc;
tc = (struct tdb_crypto *) crp->crp_opaque;
skip = tc->tc_skip;
@@ -245,7 +242,6 @@ ipcomp_input_cb(op)
error = EPERM;
goto baddone;
}
- ipcompx = (struct comp_algo *) tdb->tdb_compalgxform;
/* update the counters */
tdb->tdb_cur_bytes += m->m_pkthdr.len - (skip + hlen);
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index c0e7486c3c0..039ed123966 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.172 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.173 2008/09/15 21:46:01 chl Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -701,14 +701,12 @@ tdb_delete(struct tdb *tdbp)
s = spltdb();
if (tdbh[hashval] == tdbp) {
- tdbpp = tdbp;
tdbh[hashval] = tdbp->tdb_hnext;
} else {
for (tdbpp = tdbh[hashval]; tdbpp != NULL;
tdbpp = tdbpp->tdb_hnext) {
if (tdbpp->tdb_hnext == tdbp) {
tdbpp->tdb_hnext = tdbp->tdb_hnext;
- tdbpp = tdbp;
break;
}
}
@@ -719,14 +717,12 @@ tdb_delete(struct tdb *tdbp)
hashval = tdb_hash(0, &tdbp->tdb_dst, tdbp->tdb_sproto);
if (tdbaddr[hashval] == tdbp) {
- tdbpp = tdbp;
tdbaddr[hashval] = tdbp->tdb_anext;
} else {
for (tdbpp = tdbaddr[hashval]; tdbpp != NULL;
tdbpp = tdbpp->tdb_anext) {
if (tdbpp->tdb_anext == tdbp) {
tdbpp->tdb_anext = tdbp->tdb_anext;
- tdbpp = tdbp;
break;
}
}
@@ -735,7 +731,6 @@ tdb_delete(struct tdb *tdbp)
hashval = tdb_hash(0, &tdbp->tdb_src, tdbp->tdb_sproto);
if (tdbsrc[hashval] == tdbp) {
- tdbpp = tdbp;
tdbsrc[hashval] = tdbp->tdb_snext;
}
else {
@@ -743,7 +738,6 @@ tdb_delete(struct tdb *tdbp)
tdbpp = tdbpp->tdb_snext) {
if (tdbpp->tdb_snext == tdbp) {
tdbpp->tdb_snext = tdbp->tdb_snext;
- tdbpp = tdbp;
break;
}
}
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index a23baa6ce24..27b16f5cfd1 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_mroute.c,v 1.50 2008/01/02 03:33:18 brad Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.51 2008/09/15 21:46:01 chl Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
@@ -844,7 +844,6 @@ add_vif(struct mbuf *m)
ifa = ifa_ifwithaddr(sintosa(&sin));
if (ifa == NULL)
return (EADDRNOTAVAIL);
- ifp = ifa->ifa_ifp;
}
if (vifcp->vifc_flags & VIFF_TUNNEL) {