summaryrefslogtreecommitdiffstats
path: root/usr.sbin/traceroute
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2018-11-12 00:26:30 +0000
committerdlg <dlg@openbsd.org>2018-11-12 00:26:30 +0000
commitaacddbd0dce19b9c82549d7d9584525d7eef307f (patch)
tree755a3209f4c79c46ee516bfe15b8812c5918d10d /usr.sbin/traceroute
parentregen (diff)
downloadwireguard-openbsd-aacddbd0dce19b9c82549d7d9584525d7eef307f.tar.xz
wireguard-openbsd-aacddbd0dce19b9c82549d7d9584525d7eef307f.zip
get rid of useless casts on setsockopt calls
suggested by kn@ after similar changes to ping
Diffstat (limited to 'usr.sbin/traceroute')
-rw-r--r--usr.sbin/traceroute/traceroute.c14
1 files changed, 7 insertions, 7 deletions
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) {