diff options
author | Paulo Marques <pmarques@grupopie.com> | 2005-06-23 03:09:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-23 12:45:18 -0400 |
commit | 543537bd922692bc978e2e356fcd8bfc9c2ee7d5 (patch) | |
tree | 0089e3907e7d6c17c01cffc6ea4a8962ed053079 /net/core/neighbour.c | |
parent | 991114c6fa6a21d1fa4d544abe78592352860c82 (diff) |
[PATCH] create a kstrdup library function
This patch creates a new kstrdup library function and changes the "local"
implementations in several places to use this function.
Most of the changes come from the sound and net subsystems. The sound part
had already been acknowledged by Takashi Iwai and the net part by David S.
Miller.
I left UML alone for now because I would need more time to read the code
carefully before making changes there.
Signed-off-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index f6bdcad47da6..851eb927ed97 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <net/sock.h> | 32 | #include <net/sock.h> |
33 | #include <linux/rtnetlink.h> | 33 | #include <linux/rtnetlink.h> |
34 | #include <linux/random.h> | 34 | #include <linux/random.h> |
35 | #include <linux/string.h> | ||
35 | 36 | ||
36 | #define NEIGH_DEBUG 1 | 37 | #define NEIGH_DEBUG 1 |
37 | 38 | ||
@@ -2592,7 +2593,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, | |||
2592 | t->neigh_vars[17].extra1 = dev; | 2593 | t->neigh_vars[17].extra1 = dev; |
2593 | } | 2594 | } |
2594 | 2595 | ||
2595 | dev_name = net_sysctl_strdup(dev_name_source); | 2596 | dev_name = kstrdup(dev_name_source, GFP_KERNEL); |
2596 | if (!dev_name) { | 2597 | if (!dev_name) { |
2597 | err = -ENOBUFS; | 2598 | err = -ENOBUFS; |
2598 | goto free; | 2599 | goto free; |