drivers/net/phy_notify.c: Change sprintf to strncpy in phy_notify. On some platforms, the sprintf doesn't accept a const char* as a format argument.

This commit is contained in:
Jukka Laitinen 2019-04-30 06:24:43 -06:00 committed by Gregory Nutt
parent 285fb555d0
commit d1c9cf2e93

View File

@ -329,7 +329,7 @@ int phy_notify_subscribe(FAR const char *intf, pid_t pid,
client->pid = pid;
client->event = *event;
snprintf(client->intf, CONFIG_PHY_NOTIFICATION_MAXINTFLEN+1, intf);
strncpy(client->intf, intf, CONFIG_PHY_NOTIFICATION_MAXINTFLEN + 1);
client->intf[CONFIG_PHY_NOTIFICATION_MAXINTFLEN] = '\0';
/* Attach/re-attach the PHY interrupt */