-/* $OpenBSD: ping.c,v 1.221 2017/07/05 07:15:40 florian Exp $ */
+/* $OpenBSD: ping.c,v 1.222 2017/07/08 16:21:51 florian Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* let the kernel pass extension headers of incoming packets,
* for privileged socket options
*/
- if ((options & F_VERBOSE) != 0) {
+ if (options & F_VERBOSE) {
int opton = 1;
if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVHOPOPTS,
(void)signal(SIGINT, onsignal);
(void)signal(SIGINFO, onsignal);
- if ((options & F_FLOOD) == 0) {
+ if (!(options & F_FLOOD)) {
(void)signal(SIGALRM, onsignal);
itimer.it_interval = interval;
itimer.it_value = interval;
* a path MTU notification.)
*/
if ((mtu = get_pathmtu(&m, &dst6)) > 0) {
- if ((options & F_VERBOSE) != 0) {
+ if (options & F_VERBOSE) {
printf("new path MTU (%d) is "
"notified\n", mtu);
}
static char buf[NI_MAXHOST];
int flag = 0;
- if ((options & F_HOSTNAME) == 0)
+ if (!(options & F_HOSTNAME))
flag |= NI_NUMERICHOST;
if (getnameinfo(addr, addrlen, buf, sizeof(buf), NULL, 0, flag) == 0)
dst->sin6_scope_id &&
mtuctl->ip6m_addr.sin6_scope_id !=
dst->sin6_scope_id)) {
- if ((options & F_VERBOSE) != 0) {
+ if (options & F_VERBOSE) {
printf("path MTU for %s is notified. "
"(ignored)\n",
pr_addr((struct sockaddr *)