# HG changeset patch # User Florian Pose # Date 1256732228 -3600 # Node ID b4ad9d06962dbe6fd73a4a32efae33a2bd5994a0 # Parent cd9672f638869f7d06d1bbbca2649702afc1adc0 Using snprintf for interface name. diff -r cd9672f63886 -r b4ad9d06962d master/module.c --- a/master/module.c Tue Oct 20 13:14:53 2009 +0200 +++ b/master/module.c Wed Oct 28 13:17:08 2009 +0100 @@ -463,7 +463,8 @@ 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 {