Commit:     8e2b705649e294f43a8cd1ea79e4c594c0bd1d9d
Parent:     2a9807c0d39066236640aa34ca8de168e690632f
Author:     Neil Horman <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:26:33 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:42:50 2007 -0700

    argv_split: allow argv_split to handle NULL pointer in argcp parameter 
    It would be nice if the argv_split library function could gracefully handle
    a NULL pointer in the argcp parameter, so as to allow functions using it
    that did not care about the value of argc to not have to declare a useless
    variable.  This patch accomplishes that.  Tested by me, with successful
    Signed-off-by: Neil Horman <[EMAIL PROTECTED]>
    Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]>
    Cc: Satyam Sharma <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 lib/argv_split.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/argv_split.c b/lib/argv_split.c
index 4096ed4..fad6ce4 100644
--- a/lib/argv_split.c
+++ b/lib/argv_split.c
@@ -75,7 +75,9 @@ char **argv_split(gfp_t gfp, const char *str, int *argcp)
        if (argv == NULL)
                goto out;
-       *argcp = argc;
+       if (argcp)
+               *argcp = argc;
        argvp = argv;
        while (*str) {
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to