diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-03-23 12:13:36 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-23 12:13:36 +0300 |
commit | eda2360ad18b7cde87728fad85c6735a52c2576e (patch) | |
tree | 2bc28704b40686c0d3d0fd5aa7d000f9d9dd153f /lib/mpi/mpi-cmp.c | |
parent | 1d23c4518b1f3a03c278f23333149245c178d2a6 (diff) | |
parent | bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff) | |
download | linux-eda2360ad18b7cde87728fad85c6735a52c2576e.tar.xz |
Merge tag 'v4.0-rc5' into x86/fpu, to prevent conflicts
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
-rw-r--r-- | lib/mpi/mpi-cmp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/mpi/mpi-cmp.c b/lib/mpi/mpi-cmp.c index 1871e7b61ca0..d25e9e96c310 100644 --- a/lib/mpi/mpi-cmp.c +++ b/lib/mpi/mpi-cmp.c @@ -57,14 +57,12 @@ int mpi_cmp(MPI u, MPI v) if (usize != vsize && !u->sign && !v->sign) return usize - vsize; if (usize != vsize && u->sign && v->sign) - return vsize + usize; + return vsize - usize; if (!usize) return 0; cmp = mpihelp_cmp(u->d, v->d, usize); - if (!cmp) - return 0; - if ((cmp < 0 ? 1 : 0) == (u->sign ? 1 : 0)) - return 1; - return -1; + if (u->sign) + return -cmp; + return cmp; } EXPORT_SYMBOL_GPL(mpi_cmp); |