From c068f513c3ec62d0f2165bd7a9da07fc16f7f9e6 Mon Sep 17 00:00:00 2001 From: bluhm Date: Thu, 23 Dec 2021 22:35:11 +0000 Subject: [PATCH] Remove unused variables and assignments in ah and esp output. found by clang 13; OK tobhe@ --- sys/netinet/ip_ah.c | 7 ++----- sys/netinet/ip_esp.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index 4cf51d26535..286c6cb2f2f 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.172 2021/12/23 12:21:48 bluhm Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.173 2021/12/23 22:35:11 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -863,7 +863,7 @@ ah_output(struct mbuf *m, struct tdb *tdb, int skip, int protoff) struct cryptop *crp = NULL; uint64_t replay64; uint16_t iplen; - int error, rplen, roff, ilen, olen; + int error, rplen, roff; uint8_t *ptr = NULL; uint8_t prot; struct ah *ah; @@ -1121,9 +1121,6 @@ ah_output(struct mbuf *m, struct tdb *tdb, int skip, int protoff) goto drop; } - ilen = crp->crp_ilen; - olen = crp->crp_olen; - /* Release the crypto descriptors */ crypto_freereq(crp); crp = NULL; diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index a3e8e5f8689..f904b6ddfaf 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.192 2021/12/23 12:21:48 bluhm Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.193 2021/12/23 22:35:11 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -690,7 +690,7 @@ esp_output(struct mbuf *m, struct tdb *tdb, int skip, int protoff) { const struct enc_xform *espx = tdb->tdb_encalgxform; const struct auth_hash *esph = tdb->tdb_authalgxform; - int ilen, olen, hlen, rlen, padding, blks, alen, roff, error; + int ilen, hlen, rlen, padding, blks, alen, roff, error; uint64_t replay64; uint32_t replay; struct mbuf *mi, *mo = (struct mbuf *) NULL; @@ -957,9 +957,6 @@ esp_output(struct mbuf *m, struct tdb *tdb, int skip, int protoff) goto drop; } - ilen = crp->crp_ilen; - olen = crp->crp_olen; - /* Release the crypto descriptors */ crypto_freereq(crp); -- 2.20.1