aboutsummaryrefslogtreecommitdiff
path: root/time/strftime.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/strftime.c')
-rw-r--r--time/strftime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/time/strftime.c b/time/strftime.c
index 0a830b0588..61f688e1b2 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -134,7 +134,7 @@ extern char *tzname[];
add one for integer division truncation;
add one more for a minus sign if t is signed. */
#define INT_STRLEN_BOUND(t) \
- ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 100 + 1 + TYPE_SIGNED (t))
+ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 + 1 + TYPE_SIGNED (t))
#define TM_YEAR_BASE 1900
@@ -748,7 +748,7 @@ my_strftime (s, maxsize, format, tp)
*u++ = format_char;
*u = '\0';
len = strftime (ubuf, sizeof ubuf, ufmt, tp);
- if (len == 0)
+ if (len == 0 && ubuf[0] != '\0')
return 0;
cpy (len, ubuf);
}