bsd: Use os_strlcpy instead of strlcpy

This commit is contained in:
Jouni Malinen 2010-03-06 10:04:41 +02:00
parent 3812464cda
commit d2f46a2b13

View file

@ -1160,7 +1160,7 @@ wpa_driver_bsd_event_receive(int sock, void *ctx, void *sock_ctx)
ifan = (struct if_announcemsghdr *) rtm; ifan = (struct if_announcemsghdr *) rtm;
if (ifan->ifan_index != drv->ifindex) if (ifan->ifan_index != drv->ifindex)
break; break;
strlcpy(event.interface_status.ifname, drv->ifname, os_strlcpy(event.interface_status.ifname, drv->ifname,
sizeof(event.interface_status.ifname)); sizeof(event.interface_status.ifname));
switch (ifan->ifan_what) { switch (ifan->ifan_what) {
case IFAN_DEPARTURE: case IFAN_DEPARTURE:
@ -1229,7 +1229,7 @@ wpa_driver_bsd_event_receive(int sock, void *ctx, void *sock_ctx)
if (ifm->ifm_index != drv->ifindex) if (ifm->ifm_index != drv->ifindex)
break; break;
if ((rtm->rtm_flags & RTF_UP) == 0) { if ((rtm->rtm_flags & RTF_UP) == 0) {
strlcpy(event.interface_status.ifname, drv->ifname, os_strlcpy(event.interface_status.ifname, drv->ifname,
sizeof(event.interface_status.ifname)); sizeof(event.interface_status.ifname));
event.interface_status.ievent = EVENT_INTERFACE_REMOVED; event.interface_status.ievent = EVENT_INTERFACE_REMOVED;
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN", wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN",