system/ping and ping6: Fix a typo and also a place where = used when == intended.

This commit is contained in:
Gregory Nutt 2017-10-24 12:27:27 -06:00
parent 749ea9e881
commit bf9bc28fcf
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -438,7 +438,7 @@ static void show_usage(FAR const char *progname, int exitcode)
ICMPv6_NPINGS);
printf(" -i <interval> 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);
}