diff options
author | Werner Koch <wk@gnupg.org> | 2011-03-28 14:46:36 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2011-03-28 14:46:36 +0200 |
commit | dd76819014c4e9d75c4b9613e888f7536c676a46 (patch) | |
tree | 065cea5055f317e3d2513868af1a01fc31edb5db /cipher/primegen.c | |
parent | 9730275d294b4d9cbbb2453541f001c95f5f31a3 (diff) | |
download | libgcrypt-dd76819014c4e9d75c4b9613e888f7536c676a46.tar.gz |
Fixed a few warnings emitted by gcc 4.6.
Diffstat (limited to 'cipher/primegen.c')
-rw-r--r-- | cipher/primegen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cipher/primegen.c b/cipher/primegen.c index edeb7c87..2788e349 100644 --- a/cipher/primegen.c +++ b/cipher/primegen.c @@ -738,12 +738,12 @@ gcry_mpi_t _gcry_generate_elg_prime (int mode, unsigned pbits, unsigned qbits, gcry_mpi_t g, gcry_mpi_t **ret_factors) { - gcry_err_code_t err = GPG_ERR_NO_ERROR; gcry_mpi_t prime = NULL; - err = prime_generate_internal ((mode == 1), &prime, pbits, qbits, g, - ret_factors, GCRY_WEAK_RANDOM, 0, 0, - NULL, NULL); + if (prime_generate_internal ((mode == 1), &prime, pbits, qbits, g, + ret_factors, GCRY_WEAK_RANDOM, 0, 0, + NULL, NULL)) + prime = NULL; /* (Should be NULL in the error case anyway.) */ return prime; } |