aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHagen Paul Pfeifer <hagen@jauu.net>2010-04-06 01:39:52 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-06 22:50:20 -0400
commit842509b8591fd9a40f5532a5f049bd29804af6d6 (patch)
tree54fdbffa504348ecf0945df67479ea01898c8ee5
parentc6537d6742985da1fbf12ae26cde6a096fd35b5c (diff)
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>
-rw-r--r--net/socket.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c
index 769c386bd428..ae904b58d9f5 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -619,10 +619,9 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
619 put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMP, 619 put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMP,
620 sizeof(tv), &tv); 620 sizeof(tv), &tv);
621 } else { 621 } else {
622 struct timespec ts; 622 skb_get_timestampns(skb, &ts[0]);
623 skb_get_timestampns(skb, &ts);
624 put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPNS, 623 put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPNS,
625 sizeof(ts), &ts); 624 sizeof(ts[0]), &ts[0]);
626 } 625 }
627 } 626 }
628 627