Using snprintf for interface name.

This commit is contained in:
Florian Pose 2009-10-28 13:17:08 +01:00
parent e2ff88656d
commit ed57943fd4
1 changed files with 2 additions and 1 deletions

View File

@ -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 {