about summary refs log tree commit diff
path: root/time/strptime_l.c
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2013-12-04 13:53:13 +0100
committerOndřej Bílka <neleai@seznam.cz>2013-12-04 13:53:13 +0100
commit19e3372ba4538f85b6c73361feaf408ae0e65ebe (patch)
treeeb1dd8fcbc517fbfd6ae173bc970db7d5447c3ee /time/strptime_l.c
parentecaf142d3d70630a0d7f028d334b5339ff2b996d (diff)
downloadglibc-19e3372ba4538f85b6c73361feaf408ae0e65ebe.tar.gz
glibc-19e3372ba4538f85b6c73361feaf408ae0e65ebe.tar.xz
glibc-19e3372ba4538f85b6c73361feaf408ae0e65ebe.zip
Allow strptime read outputs from strftime. Fixes bug 4772.
Diffstat (limited to 'time/strptime_l.c')
-rw-r--r--time/strptime_l.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/time/strptime_l.c b/time/strptime_l.c
index c2c2ee83c5..b9a8e144fe 100644
--- a/time/strptime_l.c
+++ b/time/strptime_l.c
@@ -320,17 +320,14 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
 	}
 
       ++fmt;
-      if (statep != NULL)
-	{
-	  /* In recursive calls silently discard strftime modifiers.  */
-	  while (*fmt == '-' || *fmt == '_' || *fmt == '0'
-		 || *fmt == '^' || *fmt == '#')
-	    ++fmt;
-
-	  /* And field width.  */
-	  while (*fmt >= '0' && *fmt <= '9')
-	    ++fmt;
-	}
+      /* We discard strftime modifiers.  */
+      while (*fmt == '-' || *fmt == '_' || *fmt == '0'
+	     || *fmt == '^' || *fmt == '#')
+	++fmt;
+
+      /* And field width.  */
+      while (*fmt >= '0' && *fmt <= '9')
+	++fmt;
 
 #ifndef _NL_CURRENT
       /* We need this for handling the `E' modifier.  */