aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-04-14 04:08:13 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-14 15:41:49 -0400
commitbf84a01063eaab2f1a37d72d1b903445b3a25a4e (patch)
treefea0862757422b93ee4f158bf2a6f855a605d5b9 /net/ipv4
parent9d9f163c82c678f1efe6e7d40d8691dca08c3eab (diff)
net: sock: make sock_tx_timestamp void
Currently, sock_tx_timestamp() always returns 0. The comment that describes the sock_tx_timestamp() function wrongly says that it returns an error when an invalid argument is passed (from commit 20d4947353be, ``net: socket infrastructure for SO_TIMESTAMPING''). Make the function void, so that we can also remove all the unneeded if conditions that check for such a _non-existant_ error case in the output path. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ping.c5
-rw-r--r--net/ipv4/udp.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 2e91006d6076..7d93d62cd5fd 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -514,9 +514,8 @@ static int ping_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
514 ipc.opt = NULL; 514 ipc.opt = NULL;
515 ipc.oif = sk->sk_bound_dev_if; 515 ipc.oif = sk->sk_bound_dev_if;
516 ipc.tx_flags = 0; 516 ipc.tx_flags = 0;
517 err = sock_tx_timestamp(sk, &ipc.tx_flags); 517
518 if (err) 518 sock_tx_timestamp(sk, &ipc.tx_flags);
519 return err;
520 519
521 if (msg->msg_controllen) { 520 if (msg->msg_controllen) {
522 err = ip_cmsg_send(sock_net(sk), msg, &ipc); 521 err = ip_cmsg_send(sock_net(sk), msg, &ipc);
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 7117d1467b02..2722db024a0b 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -902,9 +902,9 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
902 ipc.addr = inet->inet_saddr; 902 ipc.addr = inet->inet_saddr;
903 903
904 ipc.oif = sk->sk_bound_dev_if; 904 ipc.oif = sk->sk_bound_dev_if;
905 err = sock_tx_timestamp(sk, &ipc.tx_flags); 905
906 if (err) 906 sock_tx_timestamp(sk, &ipc.tx_flags);
907 return err; 907
908 if (msg->msg_controllen) { 908 if (msg->msg_controllen) {
909 err = ip_cmsg_send(sock_net(sk), msg, &ipc); 909 err = ip_cmsg_send(sock_net(sk), msg, &ipc);
910 if (err) 910 if (err)