summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypbind
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>1999-04-13 16:26:21 +0000
committersimokawa <simokawa@FreeBSD.org>1999-04-13 16:26:21 +0000
commit044dbb065cd9b1b898aee0a76a92d945f6905fee (patch)
tree90624bd536a5c75a19bac009d559a3efec02e670 /usr.sbin/ypbind
parent57906549b48b979bb03518c2ede3411467f709b1 (diff)
downloadFreeBSD-src-044dbb065cd9b1b898aee0a76a92d945f6905fee.zip
FreeBSD-src-044dbb065cd9b1b898aee0a76a92d945f6905fee.tar.gz
Use u_int32_t for sin_addr.s_addr rather than u_long to avoid
unaligned access on alpha.
Diffstat (limited to 'usr.sbin/ypbind')
-rw-r--r--usr.sbin/ypbind/ypbind.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index 52aaad1..507fd2e 100644
--- a/usr.sbin/ypbind/ypbind.c
+++ b/usr.sbin/ypbind/ypbind.c
@@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: ypbind.c,v 1.27 1998/01/19 23:31:38 wpaul Exp $";
+ "$Id: ypbind.c,v 1.28 1999/02/10 20:04:22 wpaul Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -230,7 +230,7 @@ rejecting.", *argp);
res.ypbind_status = YPBIND_SUCC_VAL;
res.ypbind_resp_u.ypbind_error = 0; /* Success */
- *(u_long *)&res.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr =
+ *(u_int32_t *)&res.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr =
ypdb->dom_server_addr.sin_addr.s_addr;
*(u_short *)&res.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port =
ypdb->dom_server_addr.sin_port;
@@ -283,7 +283,7 @@ rejecting.", argp->ypsetdom_domain);
bzero((char *)&bindsin, sizeof bindsin);
bindsin.sin_family = AF_INET;
- bindsin.sin_addr.s_addr = *(u_long *)argp->ypsetdom_binding.ypbind_binding_addr;
+ bindsin.sin_addr.s_addr = *(u_int32_t *)argp->ypsetdom_binding.ypbind_binding_addr;
bindsin.sin_port = *(u_short *)argp->ypsetdom_binding.ypbind_binding_port;
rpc_received(argp->ypsetdom_domain, &bindsin, 1);
@@ -946,7 +946,7 @@ int force;
bzero(&ybr, sizeof ybr);
ybr.ypbind_status = YPBIND_SUCC_VAL;
- *(u_long *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr = raddrp->sin_addr.s_addr;
+ *(u_int32_t *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr = raddrp->sin_addr.s_addr;
*(u_short *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port = raddrp->sin_port;
if( writev(ypdb->dom_lockfd, iov, 2) != iov[0].iov_len + iov[1].iov_len) {
OpenPOWER on IntegriCloud