aboutsummaryrefslogtreecommitdiff
path: root/crypto/bn/bn_nist.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2013-02-14 09:51:41 +0100
committerAndy Polyakov <appro@openssl.org>2013-02-14 09:51:41 +0100
commit750398acd85a7ae220d272d28a76dff7bb269c31 (patch)
tree47670d734df15fbf6c26ac0be93a8bb91a27207b /crypto/bn/bn_nist.c
parent2527b94fec345c0bec58f4c7a810b7b8d0552b17 (diff)
downloadopenssl-750398acd85a7ae220d272d28a76dff7bb269c31.zip
openssl-750398acd85a7ae220d272d28a76dff7bb269c31.tar.gz
openssl-750398acd85a7ae220d272d28a76dff7bb269c31.tar.bz2
bn_nist.c: work around clang 3.0 bug.
Diffstat (limited to 'crypto/bn/bn_nist.c')
-rw-r--r--crypto/bn/bn_nist.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/crypto/bn/bn_nist.c b/crypto/bn/bn_nist.c
index bf8930f..abd53df 100644
--- a/crypto/bn/bn_nist.c
+++ b/crypto/bn/bn_nist.c
@@ -306,29 +306,25 @@ const BIGNUM *BN_get0_nist_prime_521(void)
}
-static void nist_cp_bn_0(BN_ULONG *buf, const BN_ULONG *a, int top, int max)
+static void nist_cp_bn_0(BN_ULONG *dst, const BN_ULONG *src, int top, int max)
{
int i;
- BN_ULONG *_tmp1 = (buf);
- const BN_ULONG *_tmp2 = (a);
#ifdef BN_DEBUG
OPENSSL_assert(top <= max);
#endif
- for (i = (top); i != 0; i--)
- *_tmp1++ = *_tmp2++;
- for (i = (max) - (top); i != 0; i--)
- *_tmp1++ = (BN_ULONG) 0;
+ for (i = 0; i < top; i++)
+ dst[i] = src[i];
+ for (; i < max; i++)
+ dst[i] = 0;
}
-static void nist_cp_bn(BN_ULONG *buf, const BN_ULONG *a, int top)
+static void nist_cp_bn(BN_ULONG *dst, const BN_ULONG *src, int top)
{
int i;
- BN_ULONG *_tmp1 = (buf);
- const BN_ULONG *_tmp2 = (a);
- for (i = (top); i != 0; i--)
- *_tmp1++ = *_tmp2++;
+ for (i = 0; i < top; i++)
+ dst[i] = src[i];
}
#if BN_BITS2 == 64