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:
parent
285fb555d0
commit
d1c9cf2e93
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user