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); }