Skip to content

Commit

Permalink
ping: change couple perror() calls to error()
Browse files Browse the repository at this point in the history
I missed these in earlier error printing commit.

Reference: eef1c38
Signed-off-by: Sami Kerola <[email protected]>
  • Loading branch information
kerolasa committed Dec 22, 2018
1 parent 1dd24f2 commit b8e6298
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions ping6_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,7 @@ int ping6_run(int argc, char **argv, struct addrinfo *ai, struct socket_st *sock
if (
setsockopt(probe_fd, IPPROTO_IPV6, IPV6_PKTINFO, &ipi, sizeof ipi) == -1 ||
setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO, &ipi, sizeof ipi) == -1) {
perror("setsockopt(IPV6_PKTINFO)");
exit(2);
error(2, errno, "setsockopt(IPV6_PKTINFO)");
}
#endif
if (
Expand Down
2 changes: 1 addition & 1 deletion ping_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ int pinger(ping_func_set_st *fset, socket_st *sock)
if (options & F_FLOOD)
write_stdout("E", 1);
else
perror("ping: sendmsg");
error(0, errno, "sendmsg");
}
tokens = 0;
return SCHINT(interval);
Expand Down

0 comments on commit b8e6298

Please sign in to comment.