On Tue, Nov 15, 2016 at 7:57 PM, YUAN Linyu
<linyu.y...@alcatel-sbell.com.cn> wrote:
> No, this patch will not change dev->name,
> It's care about ifa->ifa_label.
>> -                     if (colon)
>> -                             memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
>> -                     else
>> -                             memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
> When ifr.ifr_name have no colon, dev->name must equal to ifr.ifr_name.
> So we change to
>> -                     else
>> -                             memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
> Then if and else do same thing. Just one line is enough,
> memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
>

I don't understand why you try to optimize a slow path and some kind of
obsolete code.

Reply via email to