mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(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.
This commit is contained in:
1 parent
f89674dc6f
commit
18445fac86
1 file changed
+2
-3
+2
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user