Skip to content

Commit

Permalink
Merge tag 'keys-next-fixes-20150114' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/dhowells/linux-fs into next
  • Loading branch information
James Morris committed Jan 15, 2015
2 parents a6391a9 + b9f918a commit bb31f60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions lib/mpi/mpi-cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion lib/mpi/mpi-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static inline int RESIZE_IF_NEEDED(MPI a, unsigned b)
do { \
mpi_size_t _i; \
for (_i = 0; _i < (n); _i++) \
(d)[_i] = (d)[_i]; \
(d)[_i] = (s)[_i]; \
} while (0)

#define MPN_COPY_DECR(d, s, n) \
Expand Down

0 comments on commit bb31f60

Please sign in to comment.