summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2014-03-29 11:33:20 +0800
committerGrissiom <[email protected]>2014-03-29 11:33:20 +0800
commit0979328fb1f7ab43c92b418bdb5111e1b828e301 (patch)
tree3b8366439a29c1f435ac8d49efdb1980a1c00f57 /components
parent96d9fd8715985908762edf0f82a0847a06f918e4 (diff)
[msh] don't complain on empty command
Just branch out and no complain on command length == 0;
Diffstat (limited to 'components')
-rw-r--r--components/finsh/msh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/finsh/msh.c b/components/finsh/msh.c
index 354f884913..1492e017e1 100644
--- a/components/finsh/msh.c
+++ b/components/finsh/msh.c
@@ -292,6 +292,9 @@ int msh_exec(char* cmd, rt_size_t length)
length--;
}
+ if (length == 0)
+ return 0;
+
/* Exec sequence:
* 1. built-in command
* 2. module(if enabled)