This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][BZ #14888] Use ISSPACE consistently in strptime


Hi,

There are a couple of places in strptime where it checks only for
spaces when trying to skip whitespace.  Attached patch fixes them.  No
regressions in the testsuite.  OK to commit?

Siddhesh

	[BZ #14888]
	* time/strptime_l.c (get_number): Use ISSPACE.
	(__strptime_internal): Likewise.

diff --git a/time/strptime_l.c b/time/strptime_l.c
index 89daffa..1f2e8b6 100644
--- a/time/strptime_l.c
+++ b/time/strptime_l.c
@@ -72,7 +72,7 @@ localtime_r (t, tp)
   do {									      \
     int __n = n;							      \
     val = 0;								      \
-    while (*rp == ' ')							      \
+    while (ISSPACE (*rp))						      \
       ++rp;								      \
     if (*rp < '0' || *rp > '9')						      \
       return NULL;							      \
@@ -752,7 +752,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
 	     also specified.  */
 	  {
 	    val = 0;
-	    while (*rp == ' ')
+	    while (ISSPACE (*rp))
 	      ++rp;
 	    if (*rp != '+' && *rp != '-')
 	      return NULL;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]