diff options
author | Chocobo1 <Chocobo1@users.noreply.github.com> | 2020-06-30 04:35:32 +0200 |
---|---|---|
committer | Chocobo1 <Chocobo1@users.noreply.github.com> | 2020-06-30 04:35:59 +0200 |
commit | d6597c87596ecb63e57c652e8f0c5e69912ba6b5 (patch) | |
tree | 3642b7aa55160850d9304ecf02c38c0aa6ba21dc /src | |
parent | Add fallthrough comment to switch cases (diff) | |
download | haveged-d6597c87596ecb63e57c652e8f0c5e69912ba6b5.tar.xz haveged-d6597c87596ecb63e57c652e8f0c5e69912ba6b5.zip |
Use labs()
Because the parameter is `long int` type.
Diffstat (limited to 'src')
-rw-r--r-- | src/havegecollect.c | 2 |
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]); } |