From 7701bf9a35cf92e6bc6cf77bf28076c1d8181da9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 29 Nov 2014 19:07:08 -0600 Subject: [PATCH] Minor whitespace cleanups. --- toys/pending/arping.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toys/pending/arping.c b/toys/pending/arping.c index fe5c76b..bc1fa5e 100644 --- a/toys/pending/arping.c +++ b/toys/pending/arping.c @@ -116,18 +116,18 @@ static void send_packet() ptr = mempcpy(ptr, &src_pk.sll_addr, src_pk.sll_halen); ptr = mempcpy(ptr, &src_addr, 4); - if (toys.optflags & FLAG_A) - ptr = mempcpy(ptr, &src_pk.sll_addr, src_pk.sll_halen); - else ptr = mempcpy(ptr, &dst_pk.sll_addr, src_pk.sll_halen); - + ptr = mempcpy(ptr, + (toys.optflags & FLAG_A) ? &src_pk.sll_addr : &dst_pk.sll_addr, + src_pk.sll_halen); ptr = mempcpy(ptr, &dest_addr, 4); + ret = sendto(TT.sockfd, sbuf, ptr - sbuf, 0, (struct sockaddr *)&dst_pk, sizeof(dst_pk)); if (ret == ptr - sbuf) { struct timeval tval; gettimeofday(&tval, NULL); - TT.sent_at = (tval.tv_sec * 1000000ULL + (tval.tv_usec)); + TT.sent_at = tval.tv_sec * 1000000ULL + tval.tv_usec; TT.sent_nr++; if (!TT.unicast_flag) TT.brd_sent++; } -- 2.7.4