nxlooper nxplayer nxrecorder: fix coverity bug
readline might return EOF. Signed-off-by: jihandong <jihandong@xiaomi.com>
This commit is contained in:
parent
de26582775
commit
6afc226350
@ -528,9 +528,9 @@ int main(int argc, FAR char *argv[])
|
||||
/* Read a line from the terminal */
|
||||
|
||||
len = readline(buffer, sizeof(buffer), stdin, stdout);
|
||||
buffer[len] = '\0';
|
||||
if (len > 0)
|
||||
{
|
||||
buffer[len] = '\0';
|
||||
if (strncmp(buffer, "!", 1) != 0)
|
||||
{
|
||||
/* nxlooper command */
|
||||
|
@ -771,9 +771,9 @@ int main(int argc, FAR char *argv[])
|
||||
/* Read a line from the terminal */
|
||||
|
||||
len = readline(buffer, sizeof(buffer), stdin, stdout);
|
||||
buffer[len] = '\0';
|
||||
if (len > 0)
|
||||
{
|
||||
buffer[len] = '\0';
|
||||
if (strncmp(buffer, "!", 1) != 0)
|
||||
{
|
||||
/* nxplayer command */
|
||||
|
@ -484,9 +484,9 @@ int main(int argc, FAR char *argv[])
|
||||
/* Read a line from the terminal */
|
||||
|
||||
len = readline(buffer, sizeof(buffer), stdin, stdout);
|
||||
buffer[len] = '\0';
|
||||
if (len > 0)
|
||||
{
|
||||
buffer[len] = '\0';
|
||||
if (strncmp(buffer, "!", 1) != 0)
|
||||
{
|
||||
/* nxrecorder command */
|
||||
|
Loading…
Reference in New Issue
Block a user