mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-18 15:20:56 +03:00
tests: fix mix of declarations and code failing C89 compliance
This commit is contained in:
@@ -51,6 +51,7 @@ int test(LIBSSH2_SESSION *session)
|
|||||||
{
|
{
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
|
|
||||||
|
const char *hostkey;
|
||||||
const char *md5_hash;
|
const char *md5_hash;
|
||||||
const char *sha1_hash;
|
const char *sha1_hash;
|
||||||
const char *sha256_hash;
|
const char *sha256_hash;
|
||||||
@@ -61,7 +62,7 @@ int test(LIBSSH2_SESSION *session)
|
|||||||
(void)EXPECTED_RSA_HOSTKEY;
|
(void)EXPECTED_RSA_HOSTKEY;
|
||||||
(void)EXPECTED_ECDSA_HOSTKEY;
|
(void)EXPECTED_ECDSA_HOSTKEY;
|
||||||
|
|
||||||
const char *hostkey = libssh2_session_hostkey(session, &len, &type);
|
hostkey = libssh2_session_hostkey(session, &len, &type);
|
||||||
if(hostkey == NULL) {
|
if(hostkey == NULL) {
|
||||||
print_last_session_error("libssh2_session_hostkey");
|
print_last_session_error("libssh2_session_hostkey");
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user