From 234e297cd9f995c0bccc0fe20557302753dc0942 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Thu, 5 May 2022 11:46:50 +0800 Subject: [PATCH] apps/nshlib: fix warning by tools converity report uninit_use_in_call inaddr.sin_zero before call netlib_set_arpmapping Signed-off-by: Jiuzhu Dong --- nshlib/nsh_netcmds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index f9b8e6eea..b7f125619 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -1028,6 +1028,7 @@ int cmd_arp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) * arp -s */ + memset(&inaddr, 0, sizeof(inaddr)); #ifdef CONFIG_NETLINK_ROUTE if (strcmp(argv[1], "-t") == 0) {