JianyuWang0623 commented on code in PR #2903:
URL: https://github.com/apache/nuttx-apps/pull/2903#discussion_r1890448079
##########
nshlib/nsh_parse.c:
##########
@@ -2733,16 +2739,12 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s
*vtbl, FAR char *cmdline)
if (param.fd_in != -1)
{
close(param.fd_in);
- param.fd_in = -1;
vtbl->np.np_redir_in = redirect_in_save;
}
- if (param.fd_out != -1)
Review Comment:
> why skip the check
As line 2724/2730 shown, `param.fd_out` will never be little than zero,
because only reach here when `pipe2()`(line 2716/2722) returns success.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]