linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix stroul endptr use
@ 2004-03-01 23:14 Kay Sievers
  2004-03-01 23:18 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Kay Sievers @ 2004-03-01 23:14 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 81 bytes --]

The endptr is never NULL, so here we hopefully do the right thing.


thanks,
Kay

[-- Attachment #2: 01-stroul-fix.patch --]
[-- Type: text/plain, Size: 671 bytes --]

===== klibc_fixups.c 1.6 vs edited =====
--- 1.6/klibc_fixups.c	Sun Feb 29 05:51:47 2004
+++ edited/klibc_fixups.c	Mon Mar  1 23:59:53 2004
@@ -74,7 +74,7 @@
 
 		if (strcmp(uname, name) == 0) {
 			id = strtoul(idstr, &tail, 10);
-			if (tail == NULL)
+			if (tail[0] != '\0')
 				id = -1;
 			else
 				dbg("id for '%s' is '%li'", name, id);
===== namedev.c 1.120 vs edited =====
--- 1.120/namedev.c	Sat Feb 28 22:51:04 2004
+++ edited/namedev.c	Tue Mar  2 00:02:05 2004
@@ -198,7 +198,7 @@
 
 	if (isdigit(*str[0])) {
 		num = (int) strtoul(*str, &tail, 10);
-		if (tail != NULL) {
+		if (num > 0) {
 			*str = tail;
 			dbg("format length=%i", num);
 			return num;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix stroul endptr use
  2004-03-01 23:14 [PATCH] fix stroul endptr use Kay Sievers
@ 2004-03-01 23:18 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2004-03-01 23:18 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Mar 02, 2004 at 12:14:41AM +0100, Kay Sievers wrote:
> The endptr is never NULL, so here we hopefully do the right thing.

Applied, thanks.

greg k-h


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-01 23:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-01 23:14 [PATCH] fix stroul endptr use Kay Sievers
2004-03-01 23:18 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).