From d6597c87596ecb63e57c652e8f0c5e69912ba6b5 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 30 Jun 2020 10:35:32 +0800 Subject: Use labs() Because the parameter is `long int` type. --- src/havegecollect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/havegecollect.c b/src/havegecollect.c index 02831b8..c83e961 100644 --- a/src/havegecollect.c +++ b/src/havegecollect.c @@ -458,7 +458,7 @@ static void havege_ndinit( /* RETURN: None */ if (0 != (h_ptr->havege_opts & H_DEBUG_COMPILE)) { h_ptr->print_msg("Address %u=%p\n", i, addr[i]); } - RESULT[i] = abs(addr[i] - addr[LOOP_CT]); + RESULT[i] = labs(addr[i] - addr[LOOP_CT]); if (i > 0 && 0 != (h_ptr->havege_opts & H_DEBUG_LOOP)) { h_ptr->print_msg("Loop %u: offset=%u, delta=%u\n", i,RESULT[i],RESULT[i-1]-RESULT[i]); } -- cgit v1.2.3