1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00
Files
libssh2/tests/test_aa_warmup.c
Viktor Szakats 2e5a8719d7 tidy-up: bump casts from int to long for large C99 types in printfs
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
2023-12-04 13:11:28 +00:00

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 */
}