From 262dd9fb2aa1d80fcfa7d692fc19c7b45ef55bdb Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Thu, 8 Jul 2021 09:22:31 +0000 Subject: The properties of the crypto algorithms never change. Declare them constant. Then they are mapped as read only. OK deraadt@ dlg@ --- sys/netinet/ip_ipcomp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/netinet/ip_ipcomp.c') diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index c93c34a4c96..8540694dcb5 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.68 2021/06/18 15:34:21 bluhm Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.69 2021/07/08 09:22:30 bluhm Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -77,7 +77,7 @@ ipcomp_attach(void) int ipcomp_init(struct tdb *tdbp, struct xformsw *xsp, struct ipsecinit *ii) { - struct comp_algo *tcomp = NULL; + const struct comp_algo *tcomp = NULL; struct cryptoini cric; int error; @@ -133,7 +133,7 @@ ipcomp_zeroize(struct tdb *tdbp) int ipcomp_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff) { - struct comp_algo *ipcompx = (struct comp_algo *) tdb->tdb_compalgxform; + const struct comp_algo *ipcompx = tdb->tdb_compalgxform; struct tdb_crypto *tc; int hlen, error; @@ -321,7 +321,7 @@ int ipcomp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, int protoff) { - struct comp_algo *ipcompx = (struct comp_algo *) tdb->tdb_compalgxform; + const struct comp_algo *ipcompx = tdb->tdb_compalgxform; int error, hlen; struct cryptodesc *crdc = NULL; struct cryptop *crp = NULL; -- cgit v1.2.3