diff --git a/system/ping/ping.c b/system/ping/ping.c index 4588393ab..bc5e20ea8 100644 --- a/system/ping/ping.c +++ b/system/ping/ping.c @@ -345,6 +345,8 @@ int main(int argc, FAR char *argv[]) int exitcode; int option; + memset(&info, 0, sizeof(info)); + info.count = ICMP_NPINGS; info.datalen = ICMP_PING_DATALEN; info.delay = ICMP_POLL_DELAY; diff --git a/system/ping6/ping6.c b/system/ping6/ping6.c index 409f3db0e..e4644ede6 100644 --- a/system/ping6/ping6.c +++ b/system/ping6/ping6.c @@ -286,6 +286,8 @@ int main(int argc, FAR char *argv[]) int exitcode; int option; + memset(&info, 0, sizeof(info)); + info.count = ICMPv6_NPINGS; info.datalen = ICMPv6_PING6_DATALEN; info.delay = ICMPv6_POLL_DELAY;