aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2015-01-14 19:30:54 -0500
committerJames Morris <james.l.morris@oracle.com>2015-01-14 19:30:54 -0500
commitbb31f607a0900552926ebf9ef3d002d96a43f7cc (patch)
treea6ae975240200606efa47fc0921f2a8f3d27af03
parenta6391a924cf5a16761ccd6b45094a7d5b9aeebac (diff)
parentb9f918a31d629e99c9ca3d6ac2a2d7a905715c69 (diff)
Merge tag 'keys-next-fixes-20150114' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next
-rw-r--r--lib/mpi/mpi-cmp.c10
-rw-r--r--lib/mpi/mpi-internal.h2
2 files changed, 5 insertions, 7 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)
57 if (usize != vsize && !u->sign && !v->sign) 57 if (usize != vsize && !u->sign && !v->sign)
58 return usize - vsize; 58 return usize - vsize;
59 if (usize != vsize && u->sign && v->sign) 59 if (usize != vsize && u->sign && v->sign)
60 return vsize + usize; 60 return vsize - usize;
61 if (!usize) 61 if (!usize)
62 return 0; 62 return 0;
63 cmp = mpihelp_cmp(u->d, v->d, usize); 63 cmp = mpihelp_cmp(u->d, v->d, usize);
64 if (!cmp) 64 if (u->sign)
65 return 0; 65 return -cmp;
66 if ((cmp < 0 ? 1 : 0) == (u->sign ? 1 : 0)) 66 return cmp;
67 return 1;
68 return -1;
69} 67}
70EXPORT_SYMBOL_GPL(mpi_cmp); 68EXPORT_SYMBOL_GPL(mpi_cmp);
diff --git a/lib/mpi/mpi-internal.h b/lib/mpi/mpi-internal.h
index 60cf765628e9..c65dd1bff45a 100644
--- a/lib/mpi/mpi-internal.h
+++ b/lib/mpi/mpi-internal.h
@@ -84,7 +84,7 @@ static inline int RESIZE_IF_NEEDED(MPI a, unsigned b)
84 do { \ 84 do { \
85 mpi_size_t _i; \ 85 mpi_size_t _i; \
86 for (_i = 0; _i < (n); _i++) \ 86 for (_i = 0; _i < (n); _i++) \
87 (d)[_i] = (d)[_i]; \ 87 (d)[_i] = (s)[_i]; \
88 } while (0) 88 } while (0)
89 89
90#define MPN_COPY_DECR(d, s, n) \ 90#define MPN_COPY_DECR(d, s, n) \