mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sysctl_binary.c: use skip_spaces to strip leading whitespace
@ 2010-01-19 21:01 H Hartley Sweeten
  0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2010-01-19 21:01 UTC (permalink / raw)
  To: Linux Kernel

Use the library function instead of a while loop.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index 8f5d16e..0220e35 100644
--- a/kernel/sysctl_binary.c
+++ b/kernel/sysctl_binary.c
@@ -1001,8 +1001,7 @@ static ssize_t bin_intvec(struct file *file,
 			unsigned long value;
 
 			value = simple_strtoul(str, &str, 10);
-			while (isspace(*str))
-				str++;
+			str = skip_spaces(str);
 			
 			result = -EFAULT;
 			if (put_user(value, vec + i))
@@ -1079,8 +1078,7 @@ static ssize_t bin_ulongvec(struct file *file,
 			unsigned long value;
 
 			value = simple_strtoul(str, &str, 10);
-			while (isspace(*str))
-				str++;
+			str = skip_spaces(str);
 			
 			result = -EFAULT;
 			if (put_user(value, vec + i))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-19 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 21:01 [PATCH] sysctl_binary.c: use skip_spaces to strip leading whitespace H Hartley Sweeten

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®