summaryrefslogtreecommitdiff
path: root/src/_fastmath.c
diff options
context:
space:
mode:
authorSebastian Ramacher <s.ramacher@gmx.at>2012-07-03 16:43:52 +0200
committerSebastian Ramacher <s.ramacher@gmx.at>2012-07-03 16:43:52 +0200
commit78650b2b8c9d350f89454c072d680bb35f273c1a (patch)
tree79d898b95d14dc5bcfc5c3cf686539ad0de86782 /src/_fastmath.c
parentbf24d2907edb2e0dd2eede63b8679b8bdfdc96b7 (diff)
downloadpycrypto-78650b2b8c9d350f89454c072d680bb35f273c1a.tar.gz
Store result of rabinMillerTest in an int.
rabinMillerTest returns an int but getStrongPrime stores the result in an unsigned long int which makes the tests in line 1545 and 1621 useless.
Diffstat (limited to 'src/_fastmath.c')
-rw-r--r--src/_fastmath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/_fastmath.c b/src/_fastmath.c
index b8b24b6..bb8e9d4 100644
--- a/src/_fastmath.c
+++ b/src/_fastmath.c
@@ -1449,13 +1449,13 @@ cleanup:
static PyObject *
getStrongPrime (PyObject *self, PyObject *args, PyObject *kwargs)
{
- unsigned long int i, j, result, bits, x, e=0;
+ unsigned long int i, j, bits, x, e=0;
mpz_t p[2], y[2], R, X;
mpz_t tmp[2], lower_bound, upper_bound, range, increment;
mpf_t tmp_bound;
char *field;
double false_positive_prob;
- int rabin_miller_rounds, is_possible_prime, error = 0;
+ int rabin_miller_rounds, is_possible_prime, error = 0, result;
PyObject *prime, *randfunc=NULL;
static char *kwlist[] = {"N", "e", "false_positive_prob", "randfunc", NULL};
unsigned long int base_size = SIEVE_BASE_SIZE;