JianyuWang0623 commented on code in PR #2737:
URL: https://github.com/apache/nuttx-apps/pull/2737#discussion_r1803423414


##########
nshlib/nsh_fileapps.c:
##########
@@ -107,39 +106,46 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const 
char *cmd,
       goto errout_with_actions;
     }
 
-  /* Handle redirection of input */
-
-  if (redirfile_in)
+  if (exec)

Review Comment:
   > should the call always pass a valid pointer
   
   Maybe not, e.g. cmocka does not need redirection.
   ```Diff
   --- a/testing/cmocka/cmocka_main.c
   +++ b/testing/cmocka/cmocka_main.c
   @@ -182,7 +182,7 @@ int main(int argc, FAR char *argv[])
            }
    
          bypass[0] = (FAR char *)builtin->name;
   -      ret = exec_builtin(builtin->name, bypass, NULL, NULL, 0);
   +      ret = exec_builtin(builtin->name, bypass, NULL);
   ```



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to