summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-04-27 14:03:45 -0700
committerColin Cross <ccross@android.com>2012-04-27 14:03:45 -0700
commit957265bd4fe182af757886f117416d66f68854aa (patch)
tree177cee182ea61611f0b80db704203bf72ee4f3cb /lib
parent60c98d9abbd1ff3274b904027690f3c33d656250 (diff)
parent66f75a5d028beaf67c931435fdc3e7823125730c (diff)
Merge commit 'v3.4-rc4' into android-3.4
Diffstat (limited to 'lib')
-rw-r--r--lib/mpi/mpi-bit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mpi/mpi-bit.c b/lib/mpi/mpi-bit.c
index 2f526627e4f..0c505361da1 100644
--- a/lib/mpi/mpi-bit.c
+++ b/lib/mpi/mpi-bit.c
@@ -177,8 +177,8 @@ int mpi_rshift(MPI x, MPI a, unsigned n)
*/
int mpi_lshift_limbs(MPI a, unsigned int count)
{
- mpi_ptr_t ap = a->d;
- int n = a->nlimbs;
+ const int n = a->nlimbs;
+ mpi_ptr_t ap;
int i;
if (!count || !n)
@@ -187,6 +187,7 @@ int mpi_lshift_limbs(MPI a, unsigned int count)
if (RESIZE_IF_NEEDED(a, n + count) < 0)
return -ENOMEM;
+ ap = a->d;
for (i = n - 1; i >= 0; i--)
ap[i + count] = ap[i];
for (i = 0; i < count; i++)