mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-29 13:01:14 +03:00
Cast large integer types to avoid dealing with printf masks for
`size_t` and other C99 types. Some of existing code used `int`
for this, bump them to `long`.
Ref: afa6b86560
#1257
Closes #1264
25 lines
540 B
C
25 lines
540 B
C
/* Copyright (C) Viktor Szakats
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
/* Warm-up test. Always return success.
|
|
Workaround for CI/docker/etc flakiness on the first run. */
|
|
|
|
#include "runner.h"
|
|
|
|
int test(LIBSSH2_SESSION *session)
|
|
{
|
|
size_t len = 0;
|
|
int type = 0;
|
|
const char *hostkey = libssh2_session_hostkey(session, &len, &type);
|
|
|
|
(void)hostkey;
|
|
|
|
fprintf(stdout,
|
|
"libssh2_session_hostkey returned len, type: %ld, %d\n",
|
|
(long)len, type);
|
|
|
|
return 0; /* always return success */
|
|
}
|