aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-03-11 09:31:50 +0000
committerAndreas Schneider <mail@cynapses.org>2009-03-11 09:31:50 +0000
commit1edc164265b1b69496d01a2382ad4aa91cac8df8 (patch)
tree6d11fccbdc6379328cae517c21160c1d378cad46 /libssh
parentacb4e379574012a22a3fa30b59fc0cb6f34f2d13 (diff)
downloadlibssh-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
Diffstat (limited to 'libssh')
-rw-r--r--libssh/dh.c24
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;
}