evolution-data-server/evolution-data-server-1.9.2-strftime.patch

29 lines
683 B
Diff

--- evolution-data-server-1.9.2/libedataserver/e-data-server-util.c.strftime 2006-11-09 22:40:39.000000000 -0500
+++ evolution-data-server-1.9.2/libedataserver/e-data-server-util.c 2006-11-09 22:43:54.000000000 -0500
@@ -335,11 +335,11 @@
**/
size_t e_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
{
+ size_t ret;
#ifdef HAVE_LKSTRFTIME
- return strftime(s, max, fmt, tm);
+ ret = strftime(s, max, fmt, tm);
#else
char *c, *ffmt, *ff;
- size_t ret;
ffmt = g_strdup(fmt);
ff = ffmt;
@@ -365,8 +365,10 @@
ret = strftime(s, max, ffmt, tm);
g_free(ffmt);
- return ret;
#endif
+ if (ret == 0 && max > 0)
+ s[0] = '\0';
+ return ret;
}
/**