socket: remove duplicate declaration of struct timespec
struct timespec ts was alreay defined. Reuse the previously defined one and reduce the memory footprint on the stack by 16 bytes. Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c6537d6742
commit
842509b859
|
@ -619,10 +619,9 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
|
||||||
put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMP,
|
put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMP,
|
||||||
sizeof(tv), &tv);
|
sizeof(tv), &tv);
|
||||||
} else {
|
} else {
|
||||||
struct timespec ts;
|
skb_get_timestampns(skb, &ts[0]);
|
||||||
skb_get_timestampns(skb, &ts);
|
|
||||||
put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPNS,
|
put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPNS,
|
||||||
sizeof(ts), &ts);
|
sizeof(ts[0]), &ts[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue