- argv_split-allow-argv_split-to-handle-null-pointer-in-argcp-parameter-gracefully.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     argv_split: allow argv_split to handle NULL pointer in argcp parameter gracefully
has been removed from the -mm tree.  Its filename was
     argv_split-allow-argv_split-to-handle-null-pointer-in-argcp-parameter-gracefully.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: argv_split: allow argv_split to handle NULL pointer in argcp parameter gracefully
From: Neil Horman <nhorman@xxxxxxxxxxxxx>

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
results.

Signed-off-by: Neil Horman <nhorman@xxxxxxxxxxxxx>
Acked-by: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Cc: Satyam Sharma <satyam@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/argv_split.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN lib/argv_split.c~argv_split-allow-argv_split-to-handle-null-pointer-in-argcp-parameter-gracefully lib/argv_split.c
--- a/lib/argv_split.c~argv_split-allow-argv_split-to-handle-null-pointer-in-argcp-parameter-gracefully
+++ a/lib/argv_split.c
@@ -75,7 +75,9 @@ char **argv_split(gfp_t gfp, const char 
 	if (argv == NULL)
 		goto out;
 
-	*argcp = argc;
+	if (argcp)
+		*argcp = argc;
+
 	argvp = argv;
 
 	while (*str) {
_

Patches currently in -mm which might be from nhorman@xxxxxxxxxxxxx are

origin.patch
proc-export-a-processes-resource-limits-via-proc-pid.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux