You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/03/16 12:05:58 UTC

[incubator-nuttx-apps] branch master updated: nshlib/nsh_fscmds:use strchr instead of strstr

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d10751  nshlib/nsh_fscmds:use strchr instead of strstr
7d10751 is described below

commit 7d1075103711509d09e906b657bdb5548a7f0bba
Author: anjiahao <an...@xiaomi.com>
AuthorDate: Wed Mar 16 18:33:28 2022 +0800

    nshlib/nsh_fscmds:use strchr instead of strstr
    
    Signed-off-by: anjiahao <an...@xiaomi.com>
---
 nshlib/nsh_fscmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c
index 1d5dbd3..b453517 100644
--- a/nshlib/nsh_fscmds.c
+++ b/nshlib/nsh_fscmds.c
@@ -1241,7 +1241,7 @@ int cmd_mkdir(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
 
       for (; ; )
         {
-          slash = strstr(slash, "/");
+          slash = strchr(slash, '/');
           if (slash != NULL)
             {
               *slash = '\0';