From 1dc17c6e722fc03d7c19bce88ede27fe12d724ea Mon Sep 17 00:00:00 2001 From: angelos Date: Tue, 21 Mar 2000 21:00:09 +0000 Subject: [PATCH] Fix casting so it compiles on alphas (testing by janjaap@stack.nl, closing pr #1150) --- sys/netinet/ip_ah.c | 18 +++++++++--------- sys/netinet/ip_esp.c | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index ed7b57df6f7..6473eca75a3 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.35 2000/03/17 10:25:22 angelos Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.36 2000/03/21 21:00:09 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -616,8 +616,8 @@ ah_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff) /* These are passed as-is to the callback */ crp->crp_opaque1 = (caddr_t) tdb; - crp->crp_opaque2 = (caddr_t) skip; - crp->crp_opaque3 = (caddr_t) protoff; + (long) crp->crp_opaque2 = skip; + (long) crp->crp_opaque3 = protoff; return crypto_dispatch(crp); } @@ -640,8 +640,8 @@ ah_input_cb(void *op) crd = crp->crp_desc; tdb = (struct tdb *) crp->crp_opaque1; ahx = (struct auth_hash *) tdb->tdb_authalgxform; - skip = (int) crp->crp_opaque2; - protoff = (int) crp->crp_opaque3; + skip = (long) crp->crp_opaque2; + protoff = (long) crp->crp_opaque3; m = (struct mbuf *) crp->crp_buf; tdb->tdb_ref--; @@ -1062,8 +1062,8 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, /* These are passed as-is to the callback */ crp->crp_opaque1 = (caddr_t) tdb; - crp->crp_opaque2 = (caddr_t) skip; - crp->crp_opaque3 = (caddr_t) protoff; + (long) crp->crp_opaque2 = skip; + (long) crp->crp_opaque3 = protoff; return crypto_dispatch(crp); } @@ -1081,8 +1081,8 @@ ah_output_cb(void *op) crp = (struct cryptop *) op; tdb = (struct tdb *) crp->crp_opaque1; - skip = (int) crp->crp_opaque2; - protoff = (int) crp->crp_opaque3; + skip = (long) crp->crp_opaque2; + protoff = (long) crp->crp_opaque3; m = (struct mbuf *) crp->crp_buf; tdb->tdb_ref--; diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 57ee4adb935..88cff22e6f8 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.33 2000/03/17 10:25:22 angelos Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.34 2000/03/21 21:00:09 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -406,8 +406,8 @@ esp_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff) /* These are passed as-is to the callback */ crp->crp_opaque1 = (caddr_t) tdb; - crp->crp_opaque2 = (caddr_t) skip; - crp->crp_opaque3 = (caddr_t) protoff; + (long) crp->crp_opaque2 = skip; + (long) crp->crp_opaque3 = protoff; /* Decryption descriptor */ if (espx) @@ -460,8 +460,8 @@ esp_input_cb(void *op) tdb = (struct tdb *) crp->crp_opaque1; esph = (struct auth_hash *) tdb->tdb_authalgxform; espx = (struct enc_xform *) tdb->tdb_encalgxform; - skip = (int) crp->crp_opaque2; - protoff = (int) crp->crp_opaque3; + skip = (long) crp->crp_opaque2; + protoff = (long) crp->crp_opaque3; m = (struct mbuf *) crp->crp_buf; tdb->tdb_ref--; -- 2.20.1