summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChocobo1 <Chocobo1@users.noreply.github.com>2020-06-30 04:35:32 +0200
committerChocobo1 <Chocobo1@users.noreply.github.com>2020-06-30 04:35:59 +0200
commitd6597c87596ecb63e57c652e8f0c5e69912ba6b5 (patch)
tree3642b7aa55160850d9304ecf02c38c0aa6ba21dc
parentAdd fallthrough comment to switch cases (diff)
downloadhaveged-d6597c87596ecb63e57c652e8f0c5e69912ba6b5.tar.xz
haveged-d6597c87596ecb63e57c652e8f0c5e69912ba6b5.zip
Use labs()
Because the parameter is `long int` type.
-rw-r--r--src/havegecollect.c2
1 files changed, 1 insertions, 1 deletions
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]);
}