mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-23 02:23:47 +08:00
Using snprintf for interface name.
This commit is contained in:
+2
-1
@@ -463,7 +463,8 @@ ec_device_t *ecdev_offer(
|
||||
ec_device_attach(&master->main_device, net_dev, poll, module);
|
||||
up(&master->device_sem);
|
||||
|
||||
sprintf(net_dev->name, "ec%u", master->index);
|
||||
snprintf(net_dev->name, IFNAMSIZ, "ec%u", master->index);
|
||||
|
||||
return &master->main_device; // offer accepted
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user