test: fix coverity 1338157: unchecked return value

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14615)
This commit is contained in:
Pauli 2021-03-19 08:44:09 +10:00 committed by Pauli
parent 3c4c8dd84a
commit 6a6844a219

View File

@ -32,8 +32,8 @@ static int check_time(long offset)
OPENSSL_gmtime(&t2, &tm2);
OPENSSL_gmtime(&t1, &tm1);
o1 = tm1;
OPENSSL_gmtime_adj(&tm1, 0, offset);
if (!TEST_int_eq(tm1.tm_year, tm2.tm_year)
if (!TEST_true(OPENSSL_gmtime_adj(&tm1, 0, offset))
|| !TEST_int_eq(tm1.tm_year, tm2.tm_year)
|| !TEST_int_eq(tm1.tm_mon, tm2.tm_mon)
|| !TEST_int_eq(tm1.tm_mday, tm2.tm_mday)
|| !TEST_int_eq(tm1.tm_hour, tm2.tm_hour)