msh: remove usless ptr set
The ptr is set in the following code. So remove the first one.
This commit is contained in:
parent
ec4b865579
commit
a95370aa56
|
@ -358,7 +358,6 @@ void msh_auto_complete_path(char *path)
|
||||||
full_path = (char*)rt_malloc(256);
|
full_path = (char*)rt_malloc(256);
|
||||||
if (full_path == RT_NULL) return; /* out of memory */
|
if (full_path == RT_NULL) return; /* out of memory */
|
||||||
|
|
||||||
ptr = full_path;
|
|
||||||
if (*path != '/')
|
if (*path != '/')
|
||||||
{
|
{
|
||||||
getcwd(full_path, 256);
|
getcwd(full_path, 256);
|
||||||
|
@ -367,7 +366,8 @@ void msh_auto_complete_path(char *path)
|
||||||
}
|
}
|
||||||
else *full_path = '\0';
|
else *full_path = '\0';
|
||||||
|
|
||||||
index = RT_NULL; ptr = path;
|
index = RT_NULL;
|
||||||
|
ptr = path;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (*ptr == '/') index = ptr + 1; if (!*ptr) break; ptr ++;
|
if (*ptr == '/') index = ptr + 1; if (!*ptr) break; ptr ++;
|
||||||
|
|
Loading…
Reference in New Issue