changeset 5714:f6f2b5cd0813

(my_strftime): If the underlying strftime returns 0 (which shouldn't happen), generate nothing instead of returning 0 immediately, so that nstrftime (NULL, ...) doesn't return 0.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 19 Mar 2005 05:34:28 +0000
parents b91d73b06792
children 906acc558e32
files lib/strftime.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -780,9 +780,8 @@
 	    *u++ = format_char;
 	    *u = '\0';
 	    len = strftime (ubuf, sizeof ubuf, ufmt, tp);
-	    if (len == 0)
-	      return 0;
-	    cpy (len - 1, ubuf + 1);
+	    if (len != 0)
+	      cpy (len - 1, ubuf + 1);
 	  }
 	  break;
 #endif