fix stroul endptr use
PATCH 1/1 fix stroul endptr use
The endptr is never NULL, so here we hopefully do the right thing.
thanks,
Kay
===== klibc_fixups.c 1.6 vs edited =====
klibc_fixups.c +1 -1
@@ -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 =====
namedev.c +1 -1
@@ -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;
Greg KH
AppliedQuoted 1 line · Kay Sievers
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_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel