1
0
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:
Marc Hoersken
2020-06-20 18:42:24 +02:00
parent 6c99a18577
commit 0f6d3b68db

View File

@@ -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;