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: NRasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NDavid Howells <dhowells@redhat.com> Acked-by: NDmitry Kasatkin <dmitry.kasatkin@gmail.com>
Showing
想要评论请 注册 或 登录