1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 12:26:40 +02:00

core, plugins: check return code of strftime function

This commit is contained in:
Sébastien Helleu
2017-09-22 21:50:01 +02:00
parent ae66a4d8a5
commit 5aab494dd6
23 changed files with 130 additions and 72 deletions
+6 -4
View File
@@ -108,11 +108,13 @@ exec_command_list ()
{
/* process has ended */
local_time = localtime (&ptr_exec_cmd->start_time);
strftime (str_time1, sizeof (str_time1),
"%Y-%m-%d %H:%M:%S", local_time);
if (strftime (str_time1, sizeof (str_time1),
"%Y-%m-%d %H:%M:%S", local_time) == 0)
str_time1[0] = '\0';
local_time = localtime (&ptr_exec_cmd->end_time);
strftime (str_time2, sizeof (str_time2),
"%Y-%m-%d %H:%M:%S", local_time);
if (strftime (str_time2, sizeof (str_time2),
"%Y-%m-%d %H:%M:%S", local_time) == 0)
str_time2[0] = '\0';
weechat_printf (NULL,
" %s%s%s %d%s%s%s: %s\"%s%s%s\"%s (%s -> %s, %s)",
weechat_color (weechat_config_string (exec_config_color_flag_finished)),