cap_server_time: Fix strftime return value check
This commit is contained in:
parent
493f729efc
commit
eeeb228664
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ cap_server_time_process(hook_data *data)
|
|||
struct timeval tv;
|
||||
|
||||
if (!rb_gettimeofday(&tv, NULL)) {
|
||||
if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S.", gmtime(&tv.tv_sec)) < 0)
|
||||
if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S.", gmtime(&tv.tv_sec)) == 0)
|
||||
return;
|
||||
|
||||
if (rb_snprintf_append(buf, sizeof(buf), "%03uZ", (int)tv.tv_usec / 1000) < 0)
|
||||
|
|
Loading…
Reference in a new issue