[Pkg-shadow-commits] r2178 - in upstream/trunk: . libmisc
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sat Jun 14 21:02:53 UTC 2008
Author: nekral-guest
Date: 2008-06-14 21:02:52 +0000 (Sat, 14 Jun 2008)
New Revision: 2178
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/getlong.c
Log:
* libmisc/getlong.c: Reset errno before calling strtol().
Otherwise, errno could be already set to ERANGE.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-06-14 21:01:11 UTC (rev 2177)
+++ upstream/trunk/ChangeLog 2008-06-14 21:02:52 UTC (rev 2178)
@@ -1,5 +1,10 @@
2008-06-14 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/getlong.c: Reset errno before calling strtol().
+ Otherwise, errno could be already set to ERANGE.
+
+2008-06-14 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/Makefile.am, libmisc/getrange.c: Added function to parse
a range (useful for lastlog).
Modified: upstream/trunk/libmisc/getlong.c
===================================================================
--- upstream/trunk/libmisc/getlong.c 2008-06-14 21:01:11 UTC (rev 2177)
+++ upstream/trunk/libmisc/getlong.c 2008-06-14 21:02:52 UTC (rev 2178)
@@ -39,6 +39,7 @@
long val;
char *endptr;
+ errno = 0;
val = strtol (numstr, &endptr, 10);
if (('\0' != *endptr) || (ERANGE == errno)) {
return 0;
More information about the Pkg-shadow-commits
mailing list