* [PATCH 4/10][IPV4]: Use kmemdup in net/ipv4/devinet.c
@ 2006-11-17 15:17 Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: Arnaldo Carvalho de Melo @ 2006-11-17 15:17 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Code diff stats:
[acme@newtoy net-2.6.20]$ codiff /tmp/devinet.o.before /tmp/devinet.o.after
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv4/devinet.c:
devinet_sysctl_register | -38
1 function changed, 38 bytes removed
[acme@newtoy net-2.6.20]$
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
---
net/ipv4/devinet.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index a1b356c..2fd8991 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1564,12 +1564,12 @@ static void devinet_sysctl_register(stru
{
int i;
struct net_device *dev = in_dev ? in_dev->dev : NULL;
- struct devinet_sysctl_table *t = kmalloc(sizeof(*t), GFP_KERNEL);
+ struct devinet_sysctl_table *t = kmemdup(&devinet_sysctl, sizeof(*t),
+ GFP_KERNEL);
char *dev_name = NULL;
if (!t)
return;
- memcpy(t, &devinet_sysctl, sizeof(*t));
for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) {
t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf;
t->devinet_vars[i].de = NULL;
--
1.4.2.1.g3d5c
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-17 15:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-17 15:17 [PATCH 4/10][IPV4]: Use kmemdup in net/ipv4/devinet.c Arnaldo Carvalho de Melo
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).