You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/23 02:53:51 UTC

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #691: addroute: inet_pton cannot accept slash notation.

xiaoxiang781216 commented on a change in pull request #691:
URL: https://github.com/apache/incubator-nuttx-apps/pull/691#discussion_r618904132



##########
File path: nshlib/nsh_routecmds.c
##########
@@ -236,6 +236,17 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
       goto errout;
     }
 
+  /* We need to remove the slash notation before passing it to inet_pton */
+
+  if (shift > 0)
+    {
+      sptr = strchr(argv[1], '/');

Review comment:
       @antmerlino sptr isn't defined in this function.




-- 
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.

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