diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index 18f6df4a3ce97207d2465e707202ca8463effe6c..29c17da6d8c5b1e83e80cc0e7b362f33f951921b 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -620,7 +620,7 @@ long list(void) FINSH_NEXT_SYSCALL(index)) { /* skip the internal command */ - if (strncpy((char*)index->name, "__", 2) == 0) continue; + if (strncmp((char*)index->name, "__", 2) == 0) continue; #ifdef FINSH_USING_DESCRIPTION rt_kprintf("%-16s -- %s\n", index->name, index->desc);