Skip to content
Commit 7fe21291 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by David Howells
Browse files

MPILIB: Deobfuscate mpi_cmp



The condition preceding 'return 1;' makes my head hurt. At this point,
we know that u and v have the same sign; if they are negative, they
compare opposite to how their absolute values compare (which
mpihelp_cmp found for us), otherwise cmp itself is the
answer. Negating cmp is ok since mpihelp_cmp returns {-1,0,1};
-INT_MIN==INT_MIN won't bite us.

Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Acked-by: default avatarDmitry Kasatkin <dmitry.kasatkin@gmail.com>
parent b2d1965d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment