From bf9bc28fcfdd60d9d5de27825b6d82a6ba457ec8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 24 Oct 2017 12:27:27 -0600 Subject: [PATCH] system/ping and ping6: Fix a typo and also a place where = used when == intended. --- system/ping/ping.c | 4 ++-- system/ping6/ping6.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/ping/ping.c b/system/ping/ping.c index a750bc8e1..f46a832ca 100644 --- a/system/ping/ping.c +++ b/system/ping/ping.c @@ -139,7 +139,7 @@ static int ping_gethostip(FAR char *hostname, FAR struct ping_info_s *info) nerr("ERROR: gethostbyname failed: %d\n", h_errno); return -ENOENT; } - else if (he->h_addrtype = AF_INET) + else if (he->h_addrtype == AF_INET) { memcpy(&info->dest, he->h_addr, sizeof(in_addr_t)); } @@ -425,7 +425,7 @@ static void show_usage(FAR const char *progname, int exitcode) ICMP_NPINGS); printf(" -i is the default delay between pings (milliseconds).\n"); printf(" Default %d.\n", ICMP_POLL_DELAY); - printf(" -h shows this text an exits.\n"); + printf(" -h shows this text and exits.\n"); exit(exitcode); } diff --git a/system/ping6/ping6.c b/system/ping6/ping6.c index 3485fddf0..4c2fc17a1 100644 --- a/system/ping6/ping6.c +++ b/system/ping6/ping6.c @@ -438,7 +438,7 @@ static void show_usage(FAR const char *progname, int exitcode) ICMPv6_NPINGS); printf(" -i is the default delay between pings (milliseconds).\n"); printf(" Default %d.\n", ICMPv6_POLL_DELAY); - printf(" -h shows this text an exits.\n"); + printf(" -h shows this text and exits.\n"); exit(exitcode); }