From afd0140e67465c52ec0e9f33d54362f4764bea2c Mon Sep 17 00:00:00 2001 From: tangyuxin <462747508@qq.com> Date: Sat, 27 Jul 2019 09:13:19 +0800 Subject: [PATCH] =?UTF-8?q?[components][net][netdev]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=80=E5=A4=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/net/netdev/src/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/net/netdev/src/netdev.c b/components/net/netdev/src/netdev.c index b8b0504dd5..f0fe3034fa 100644 --- a/components/net/netdev/src/netdev.c +++ b/components/net/netdev/src/netdev.c @@ -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);