summaryrefslogtreecommitdiffstats
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
parentc6537d6742985da1fbf12ae26cde6a096fd35b5c (diff)
downloadop-kernel-dev-842509b8591fd9a40f5532a5f049bd29804af6d6.zip
op-kernel-dev-842509b8591fd9a40f5532a5f049bd29804af6d6.tar.gz
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 769c386..ae904b5 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]);
}
}
OpenPOWER on IntegriCloud