netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] socket: remove duplicate declaration of struct timespec
@ 2010-04-06 15:39 Hagen Paul Pfeifer
  2010-04-07  2:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Hagen Paul Pfeifer @ 2010-04-06 15:39 UTC (permalink / raw)
  To: netdev; +Cc: davem, Hagen Paul Pfeifer

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

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]);
 		}
 	}
 
-- 
1.6.6.196.g1f735.dirty


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-07  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 15:39 [PATCH] socket: remove duplicate declaration of struct timespec Hagen Paul Pfeifer
2010-04-07  2:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).