[qca-ssdk-shell]: fix the condition error
Change-Id: I38a4c60c9485b54bf9f572170c126a6cdf03f25f
Signed-off-by: Luo Jie <luoj@codeaurora.org>
diff --git a/src/shell/shell.c b/src/shell/shell.c
index fd1ff1c..a9860f6 100755
--- a/src/shell/shell.c
+++ b/src/shell/shell.c
@@ -716,12 +716,17 @@
while ((read = getline(&line, &len, in_fd)) != -1)
{
//dprintf("(%d)%s",read, line);
- if(read <= 1 ) continue;
+ if (read <= 1 )
+ {
+ continue;
+ }
- if(line[strlen(line)-1] == '\n');
- line[strlen(line)-1] = '\0';
+ if (line[strlen(line)-1] == '\n')
+ {
+ line[strlen(line)-1] = '\0';
+ }
- if(!strncmp(line, "echo", 4))
+ if (!strncmp(line, "echo", 4))
{
dprintf("%s\n", line+strlen("echo "));
continue;