1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

Fix compiler warning about unused variable.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@255 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-03-11 09:31:50 +00:00
parent acb4e37957
commit 1edc164265

View File

@@ -70,16 +70,22 @@ static int ssh_crypto_inited=0;
int ssh_get_random(void *where, int len, int strong){ int ssh_get_random(void *where, int len, int strong){
#ifdef HAVE_LIBGCRYPT #ifdef HAVE_LIBGCRYPT
// not using GCRY_VERY_STRONG_RANDOM which is a bit overkill /* variable not used in gcrypt */
gcry_randomize(where,len,GCRY_STRONG_RANDOM); (void) strong;
return 1; /* not using GCRY_VERY_STRONG_RANDOM which is a bit overkill */
gcry_randomize(where,len,GCRY_STRONG_RANDOM);
return 1;
#elif defined HAVE_LIBCRYPTO #elif defined HAVE_LIBCRYPTO
if(strong){ if (strong) {
return RAND_bytes(where,len); return RAND_bytes(where,len);
} else { } else {
return RAND_pseudo_bytes(where,len); return RAND_pseudo_bytes(where,len);
} }
#endif #endif
/* never reached */
return 1;
} }