summaryrefslogtreecommitdiff
path: root/src/plugins/relay/relay-buffer.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-09-22 21:50:01 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-09-23 15:06:28 +0200
commit5aab494dd63e6cbbbb54fa0e362ae64e85dcadb3 (patch)
treee459fec713103315d7ae30aabd2269252ec77ab0 /src/plugins/relay/relay-buffer.c
parentae66a4d8a586555104dfe633a97fa4a2f17db531 (diff)
downloadweechat-5aab494dd63e6cbbbb54fa0e362ae64e85dcadb3.zip
core, plugins: check return code of strftime function
Diffstat (limited to 'src/plugins/relay/relay-buffer.c')
-rw-r--r--src/plugins/relay/relay-buffer.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/relay/relay-buffer.c b/src/plugins/relay/relay-buffer.c
index 5a0f8f87b..5d5d02632 100644
--- a/src/plugins/relay/relay-buffer.c
+++ b/src/plugins/relay/relay-buffer.c
@@ -96,8 +96,9 @@ relay_buffer_refresh (const char *hotlist)
date_tmp = localtime (&(ptr_client->start_time));
if (date_tmp)
{
- strftime (str_date_start, sizeof (str_date_start),
- "%a, %d %b %Y %H:%M:%S", date_tmp);
+ if (strftime (str_date_start, sizeof (str_date_start),
+ "%a, %d %b %Y %H:%M:%S", date_tmp) == 0)
+ str_date_start[0] = '\0';
}
str_date_end[0] = '-';
str_date_end[1] = '\0';
@@ -106,8 +107,9 @@ relay_buffer_refresh (const char *hotlist)
date_tmp = localtime (&(ptr_client->end_time));
if (date_tmp)
{
- strftime (str_date_end, sizeof (str_date_end),
- "%a, %d %b %Y %H:%M:%S", date_tmp);
+ if (strftime (str_date_end, sizeof (str_date_end),
+ "%a, %d %b %Y %H:%M:%S", date_tmp) == 0)
+ str_date_end[0] = '\0';
}
}