summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv/yp_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ypserv/yp_main.c')
-rw-r--r--usr.sbin/ypserv/yp_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c
index 60bd6a1..958d3a6 100644
--- a/usr.sbin/ypserv/yp_main.c
+++ b/usr.sbin/ypserv/yp_main.c
@@ -329,9 +329,8 @@ create_service(const int sock, const struct netconfig *nconf,
return -1;
}
memset(slep, 0, sizeof(*slep));
- memcpy(&slep->sle_ss,
- (struct sockaddr *)(res->ai_addr),
- sizeof(res->ai_addr));
+ memcpy(&slep->sle_ss, res->ai_addr,
+ res->ai_addrlen);
slep->sle_sock = s;
SLIST_INSERT_HEAD(&sle_head, slep, sle_next);
OpenPOWER on IntegriCloud