You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/05/25 15:53:37 UTC

[incubator-nuttx-apps] 01/02: dhcpc: Don't use an uninitialized variable

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 1cb82e58acbcf0e500f5cb3f2846c43c0f9eba57
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon May 25 23:18:09 2020 +0900

    dhcpc: Don't use an uninitialized variable
---
 netutils/dhcpc/dhcpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netutils/dhcpc/dhcpc.c b/netutils/dhcpc/dhcpc.c
index b4fc52a..cdb571a 100644
--- a/netutils/dhcpc/dhcpc.c
+++ b/netutils/dhcpc/dhcpc.c
@@ -424,7 +424,7 @@ FAR void *dhcpc_open(FAR const char *interface, FAR const void *macaddr,
       pdhcpc->sockfd = socket(PF_INET, SOCK_DGRAM, 0);
       if (pdhcpc->sockfd < 0)
         {
-          ninfo("socket handle %d\n", ret);
+          ninfo("socket handle %d\n", pdhcpc->sockfd);
           free(pdhcpc);
           return NULL;
         }