From: "" <pmarques@grupopie.com>
To: Andrew Morton <akpm@osdl.org>
Cc: "" <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6] 5/7 use kstrdup library function in net/sunrpc/svcauth_unix.c
Date: Tue, 1 Feb 2005 03:28:34 +0000 [thread overview]
Message-ID: <1107228514.41fef7623df85@webmail.grupopie.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
This patch removes a private strdup in net/sunrpc/svcauth_unix.c, and updates it
to use the kstrdup library function.
Signed-off-by: Paulo Marques <pmarques@grupopie.com>
--
Paulo Marques - www.grupopie.com
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke (1729 - 1797)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch5 --]
[-- Type: text/x-diff; name="patch5", Size: 841 bytes --]
--- vanilla-2.6.11-rc2-bk9/net/sunrpc/svcauth_unix.c 2005-01-31 20:05:34.000000000 +0000
+++ linux-2.6.11-rc2-bk9/net/sunrpc/svcauth_unix.c 2005-01-31 20:36:28.536400791 +0000
@@ -8,6 +8,7 @@
#include <linux/err.h>
#include <linux/seq_file.h>
#include <linux/hash.h>
+#include <linux/string.h>
#define RPCDBG_FACILITY RPCDBG_AUTH
@@ -20,14 +21,6 @@
*/
-static char *strdup(char *s)
-{
- char *rv = kmalloc(strlen(s)+1, GFP_KERNEL);
- if (rv)
- strcpy(rv, s);
- return rv;
-}
-
struct unix_domain {
struct auth_domain h;
int addr_changes;
@@ -55,7 +48,7 @@ struct auth_domain *unix_domain_find(cha
if (new == NULL)
return NULL;
cache_init(&new->h.h);
- new->h.name = strdup(name);
+ new->h.name = kstrdup(name, GFP_KERNEL);
new->h.flavour = RPC_AUTH_UNIX;
new->addr_changes = 0;
new->h.h.expiry_time = NEVER;
reply other threads:[~2005-02-01 3:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1107228514.41fef7623df85@webmail.grupopie.com \
--to=pmarques@grupopie.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®