Merge pull request #2901 from enkiller/netdev

[components][net][netdev] 修复一处BUG
This commit is contained in:
Bernard Xiong 2019-07-29 13:31:07 +08:00 committed by GitHub
commit dfc81e2d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ int netdev_unregister(struct netdev *netdev)
for (node = &(netdev_list->list); node; node = rt_slist_next(node))
{
cur_netdev = rt_slist_entry(node, struct netdev, list);
if (cur_netdev && (rt_memcpy(cur_netdev, netdev, sizeof(struct netdev)) == 0))
if (cur_netdev && (rt_memcmp(cur_netdev, netdev, sizeof(struct netdev)) == 0))
{
rt_slist_remove(&(netdev_list->list), &(cur_netdev->list));
rt_hw_interrupt_enable(level);