mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-03 15:43:12 +00:00
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
3 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue