diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-03-11 09:31:50 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-03-11 09:31:50 +0000 |
commit | 1edc164265b1b69496d01a2382ad4aa91cac8df8 (patch) | |
tree | 6d11fccbdc6379328cae517c21160c1d378cad46 | |
parent | acb4e379574012a22a3fa30b59fc0cb6f34f2d13 (diff) | |
download | libssh-1edc164265b1b69496d01a2382ad4aa91cac8df8.tar.gz libssh-1edc164265b1b69496d01a2382ad4aa91cac8df8.tar.xz libssh-1edc164265b1b69496d01a2382ad4aa91cac8df8.zip |
Fix compiler warning about unused variable.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@255 7dcaeef0-15fb-0310-b436-a5af3365683c
-rw-r--r-- | libssh/dh.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/libssh/dh.c b/libssh/dh.c index 650a5521..68db8ae5 100644 --- a/libssh/dh.c +++ b/libssh/dh.c @@ -68,18 +68,24 @@ static bignum p; static int ssh_crypto_inited=0; int ssh_get_random(void *where, int len, int strong){ - + #ifdef HAVE_LIBGCRYPT - // not using GCRY_VERY_STRONG_RANDOM which is a bit overkill - gcry_randomize(where,len,GCRY_STRONG_RANDOM); - return 1; + /* variable not used in gcrypt */ + (void) strong; + /* not using GCRY_VERY_STRONG_RANDOM which is a bit overkill */ + gcry_randomize(where,len,GCRY_STRONG_RANDOM); + + return 1; #elif defined HAVE_LIBCRYPTO - if(strong){ - return RAND_bytes(where,len); - } else { - return RAND_pseudo_bytes(where,len); - } + if (strong) { + return RAND_bytes(where,len); + } else { + return RAND_pseudo_bytes(where,len); + } #endif + + /* never reached */ + return 1; } |