diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2015-06-15 13:26:49 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2015-06-15 13:26:49 +0000 |
commit | 887ac7affcaed2e7e8d5568178f97e5e607909a6 (patch) | |
tree | f95ca4cf221b6f675203d966e85e8d292b50b182 /sys/netinet | |
parent | f25b7eb6cab9f5bd0fa00ba0a88fe49dfdc55e18 (diff) |
Use proper argument type for crp_callback functions; no functional change.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_ipcomp.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index f2f1aebc64a..111fdf96acd 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.42 2015/04/17 11:04:01 mikeb Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.43 2015/06/15 13:26:48 mikeb Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -56,8 +56,8 @@ #include "bpfilter.h" -int ipcomp_output_cb(void *); -int ipcomp_input_cb(void *); +int ipcomp_output_cb(struct cryptop *); +int ipcomp_input_cb(struct cryptop *); #ifdef ENCDEBUG #define DPRINTF(x) if (encdebug) printf x @@ -178,10 +178,10 @@ ipcomp_input(m, tdb, skip, protoff) /* Crypto operation descriptor */ crp->crp_ilen = m->m_pkthdr.len - (skip + hlen); crp->crp_flags = CRYPTO_F_IMBUF; - crp->crp_buf = (caddr_t) m; - crp->crp_callback = (int (*) (struct cryptop *)) ipcomp_input_cb; + crp->crp_buf = (caddr_t)m; + crp->crp_callback = ipcomp_input_cb; crp->crp_sid = tdb->tdb_cryptoid; - crp->crp_opaque = (caddr_t) tc; + crp->crp_opaque = (caddr_t)tc; /* These are passed as-is to the callback */ tc->tc_skip = skip; @@ -198,14 +198,12 @@ ipcomp_input(m, tdb, skip, protoff) * IPComp input callback, called directly by the crypto driver */ int -ipcomp_input_cb(op) - void *op; +ipcomp_input_cb(struct cryptop *crp) { int error, s, skip, protoff, roff, hlen = IPCOMP_HLENGTH, clen; u_int8_t nproto; struct mbuf *m, *m1, *mo; struct tdb_crypto *tc; - struct cryptop *crp; struct tdb *tdb; struct ipcomp *ipcomp; caddr_t addr; @@ -213,8 +211,6 @@ ipcomp_input_cb(op) char buf[INET6_ADDRSTRLEN]; #endif - crp = (struct cryptop *) op; - tc = (struct tdb_crypto *) crp->crp_opaque; skip = tc->tc_skip; protoff = tc->tc_protoff; @@ -535,9 +531,9 @@ ipcomp_output(m, tdb, mp, skip, protoff) /* Crypto operation descriptor */ crp->crp_ilen = m->m_pkthdr.len; /* Total input length */ crp->crp_flags = CRYPTO_F_IMBUF; - crp->crp_buf = (caddr_t) m; - crp->crp_callback = (int (*) (struct cryptop *)) ipcomp_output_cb; - crp->crp_opaque = (caddr_t) tc; + crp->crp_buf = (caddr_t)m; + crp->crp_callback = ipcomp_output_cb; + crp->crp_opaque = (caddr_t)tc; crp->crp_sid = tdb->tdb_cryptoid; return crypto_dispatch(crp); @@ -547,10 +543,8 @@ ipcomp_output(m, tdb, mp, skip, protoff) * IPComp output callback, called directly from the crypto driver */ int -ipcomp_output_cb(cp) - void *cp; +ipcomp_output_cb(struct cryptop *crp) { - struct cryptop *crp = (struct cryptop *) cp; struct tdb_crypto *tc; struct tdb *tdb; struct mbuf *m, *mo; |