Skip to content

Commit

Permalink
In iso_if_time also return empty if iso_time returns NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell committed Feb 27, 2024
1 parent 7c4373a commit 469a03d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,13 @@ iso_if_time (time_t epoch_time)
{
static char *empty = "";
if (epoch_time)
return iso_time (&epoch_time);
{
char *ret;

ret = iso_time (&epoch_time);
if (ret)
return ret;
}
return empty;
}

Expand Down

0 comments on commit 469a03d

Please sign in to comment.