bsd: Use os_strlcpy instead of strlcpy
This commit is contained in:
parent
3812464cda
commit
d2f46a2b13
1 changed files with 4 additions and 4 deletions
|
@ -1160,8 +1160,8 @@ 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:
|
||||||
event.interface_status.ievent = EVENT_INTERFACE_REMOVED;
|
event.interface_status.ievent = EVENT_INTERFACE_REMOVED;
|
||||||
|
@ -1229,8 +1229,8 @@ 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",
|
||||||
event.interface_status.ifname);
|
event.interface_status.ifname);
|
||||||
|
|
Loading…
Reference in a new issue