diff options
| author | Grissiom <[email protected]> | 2014-04-12 16:57:14 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2014-04-12 16:57:14 +0800 |
| commit | a95370aa565a486d680d47aa28393e26a89f9088 (patch) | |
| tree | 071c91310f99f38c28a7091f6e667cea4a5e7071 /components | |
| parent | ec4b8655794ddda25984159ce14382ed468ca48f (diff) | |
msh: remove usless ptr set
The ptr is set in the following code. So remove the first one.
Diffstat (limited to 'components')
| -rw-r--r-- | components/finsh/msh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/finsh/msh.c b/components/finsh/msh.c index 49a5d23591..e585b8d3a1 100644 --- a/components/finsh/msh.c +++ b/components/finsh/msh.c @@ -358,7 +358,6 @@ void msh_auto_complete_path(char *path) full_path = (char*)rt_malloc(256); if (full_path == RT_NULL) return; /* out of memory */ - ptr = full_path; if (*path != '/') { getcwd(full_path, 256); @@ -367,7 +366,8 @@ void msh_auto_complete_path(char *path) } else *full_path = '\0'; - index = RT_NULL; ptr = path; + index = RT_NULL; + ptr = path; for (;;) { if (*ptr == '/') index = ptr + 1; if (!*ptr) break; ptr ++; |
