aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorHagen Paul Pfeifer <hagen@jauu.net>2010-04-06 05:39:52 +0000
committerDavid S. Miller <davem@davemloft.net>2010-04-06 19:50:20 -0700
commit842509b8591fd9a40f5532a5f049bd29804af6d6 (patch)
tree54fdbffa504348ecf0945df67479ea01898c8ee5 /net/socket.c
parentTIPC: Updated topology subscription protocol according to latest spec (diff)
downloadlinux-dev-842509b8591fd9a40f5532a5f049bd29804af6d6.tar.xz
linux-dev-842509b8591fd9a40f5532a5f049bd29804af6d6.zip
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>
Diffstat (limited to 'net/socket.c')
-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,
put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMP,
sizeof(tv), &tv);
} else {
- struct timespec ts;
- skb_get_timestampns(skb, &ts);
+ skb_get_timestampns(skb, &ts[0]);
put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPNS,
- sizeof(ts), &ts);
+ sizeof(ts[0]), &ts[0]);
}
}