diff mbox

socket: remove duplicate declaration of struct timespec

Message ID 1270568392-22030-1-git-send-email-hagen@jauu.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Hagen Paul Pfeifer April 6, 2010, 3:39 p.m. UTC
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>
---
 net/socket.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Comments

David Miller April 7, 2010, 2:51 a.m. UTC | #1
From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Tue,  6 Apr 2010 17:39:52 +0200

> 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>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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]);
 		}
 	}