lkml.org 
[lkml]   [2012]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] net: add new QCA alx ethernet driver
Date
>> +	strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
>> ...
>> + strcpy(netdev->name, "eth%d");
>> + retval = register_netdev(netdev);
>
>The strcpy is unnecessary, alloc_etherdev already sets that.

The strcpy is useful. netdev->name is set as pci_name in front. So the strcpy restores it.

Thanks
cloud



\
 
 \ /
  Last update: 2012-08-15 06:23    [W:0.118 / U:0.548 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site