system/ping and ping6: Fix a typo and also a place where = used when == intended.
This commit is contained in:
parent
749ea9e881
commit
bf9bc28fcf
@ -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);
|
nerr("ERROR: gethostbyname failed: %d\n", h_errno);
|
||||||
return -ENOENT;
|
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));
|
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);
|
ICMP_NPINGS);
|
||||||
printf(" -i <interval> is the default delay between pings (milliseconds).\n");
|
printf(" -i <interval> is the default delay between pings (milliseconds).\n");
|
||||||
printf(" Default %d.\n", ICMP_POLL_DELAY);
|
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);
|
exit(exitcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ static void show_usage(FAR const char *progname, int exitcode)
|
|||||||
ICMPv6_NPINGS);
|
ICMPv6_NPINGS);
|
||||||
printf(" -i <interval> is the default delay between pings (milliseconds).\n");
|
printf(" -i <interval> is the default delay between pings (milliseconds).\n");
|
||||||
printf(" Default %d.\n", ICMPv6_POLL_DELAY);
|
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);
|
exit(exitcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user