projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
040948e
)
(my_strftime): If the underlying strftime returns 0
author
Paul Eggert
<eggert@cs.ucla.edu>
Sat, 19 Mar 2005 05:34:28 +0000
(
05:34
+0000)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Sat, 19 Mar 2005 05:34:28 +0000
(
05:34
+0000)
(which shouldn't happen), generate nothing instead of returning 0
immediately, so that nstrftime (NULL, ...) doesn't return 0.
lib/strftime.c
patch
|
blob
|
history
diff --git
a/lib/strftime.c
b/lib/strftime.c
index 3be18a2b6303a44990fe031582914f5afec222c5..71052daeb66beb95a0506e4d37901a13ee2df64c 100644
(file)
--- a/
lib/strftime.c
+++ b/
lib/strftime.c
@@
-780,9
+780,8
@@
my_strftime (CHAR_T *s, size_t maxsize, const CHAR_T *format,
*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