From ab2e40ddfae349994e8fb8c4589b0af0180b9a91 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Mon, 12 Nov 2018 00:26:31 +0000 Subject: get rid of useless casts on setsockopt calls suggested by kn@ after similar changes to ping --- usr.sbin/traceroute/traceroute.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.sbin/traceroute') diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index 02fb48dfb5d..5ebb3df5573 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traceroute.c,v 1.158 2018/11/10 05:03:23 dlg Exp $ */ +/* $OpenBSD: traceroute.c,v 1.159 2018/11/12 00:26:30 dlg Exp $ */ /* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */ /* @@ -680,8 +680,8 @@ main(int argc, char *argv[]) ip->ip_v = IPVERSION; ip->ip_tos = conf->tos; - if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, (char *)&on, - sizeof(on)) < 0) + if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, + &on, sizeof(on)) < 0) err(6, "IP_HDRINCL"); if (conf->source) { @@ -820,13 +820,13 @@ main(int argc, char *argv[]) if (conf->dflag) { (void) setsockopt(rcvsock, SOL_SOCKET, SO_DEBUG, - (char *)&on, sizeof(on)); + &on, sizeof(on)); (void) setsockopt(sndsock, SOL_SOCKET, SO_DEBUG, - (char *)&on, sizeof(on)); + &on, sizeof(on)); } - if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, (char *)&datalen, - sizeof(datalen)) < 0) + if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, + &datalen, sizeof(datalen)) < 0) err(6, "SO_SNDBUF"); if (conf->nflag && !conf->Aflag) { -- cgit v1.2.3