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 2022/05/06 18:36:28 UTC

[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1161: apps/nshlibs: fix warning by tools converity report

pkarashchenko commented on code in PR #1161:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1161#discussion_r867107628


##########
nshlib/nsh_netcmds.c:
##########
@@ -776,6 +776,10 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
               gip         = addr.s_addr;
             }
         }
+      else
+        {
+          addr.s_addr = 0;

Review Comment:
   Changes looks good.
   Also during review I see that most probably `gip = 0;` is not needed at line 767 and compare at line 819 should be changed from `if (gip != 0)` to `if (gip != INADDR_ANY)`. Not related to this PR, but still will post a comment here not to forget.



-- 
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-unsubscribe@nuttx.apache.org

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