From df8c29a01d53a51005b265378df0e65111289d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=99=E8=92=99plus?= Date: Wed, 17 Sep 2025 09:30:58 +0800 Subject: [PATCH] =?UTF-8?q?[components][finsh]=20=E6=B8=85=E7=90=86?= =?UTF-8?q?=E6=8E=89=E6=97=A0=E7=94=A8=E7=9A=84=E6=8B=B7=E8=B4=9D=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=20(#10699)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理掉无用的拷贝操作 --- components/finsh/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index 14086b83d6..2d67c85fe3 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -201,7 +201,7 @@ long list_thread(void) for (i = 0; i < find_arg.nr_out; i++) { struct rt_object *obj; - struct rt_thread thread_info, *thread; + struct rt_thread *thread; obj = rt_list_entry(obj_list[i], struct rt_object, list); level = rt_spin_lock_irqsave(&info->spinlock); @@ -212,7 +212,6 @@ long list_thread(void) continue; } /* copy info */ - rt_memcpy(&thread_info, obj, sizeof thread_info); rt_spin_unlock_irqrestore(&info->spinlock, level); thread = (struct rt_thread *)obj;