git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Subject: Re: [PATCH] strstrip incorrectly marked __must_check
[safe/jmp/linux-2.6]
/
lib
/
argv_split.c
diff --git
a/lib/argv_split.c
b/lib/argv_split.c
index
4096ed4
..
4b1b083
100644
(file)
--- a/
lib/argv_split.c
+++ b/
lib/argv_split.c
@@
-4,15
+4,9
@@
#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
-#include <linux/bug.h>
-
-static const char *skip_sep(const char *cp)
-{
- while (*cp && isspace(*cp))
- cp++;
-
- return cp;
-}
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/module.h>
static const char *skip_arg(const char *cp)
{
static const char *skip_arg(const char *cp)
{
@@
-27,7
+21,7
@@
static int count_argc(const char *str)
int count = 0;
while (*str) {
int count = 0;
while (*str) {
- str = skip_s
ep
(str);
+ str = skip_s
paces
(str);
if (*str) {
count++;
str = skip_arg(str);
if (*str) {
count++;
str = skip_arg(str);
@@
-75,11
+69,13
@@
char **argv_split(gfp_t gfp, const char *str, int *argcp)
if (argv == NULL)
goto out;
if (argv == NULL)
goto out;
- *argcp = argc;
+ if (argcp)
+ *argcp = argc;
+
argvp = argv;
while (*str) {
argvp = argv;
while (*str) {
- str = skip_s
ep
(str);
+ str = skip_s
paces
(str);
if (*str) {
const char *p = str;
if (*str) {
const char *p = str;