socket: remove duplicate declaration of struct timespec
authorHagen Paul Pfeifer <hagen@jauu.net>
Tue, 6 Apr 2010 05:39:52 +0000 (05:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Apr 2010 02:50:20 +0000 (19:50 -0700)
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>
net/socket.c

index 769c386bd4288758635acde6ca77c401a49c61a8..ae904b58d9f516ef4cca81552d0bd011f19edde1 100644 (file)
@@ -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]);
                }
        }