mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-31 00:03:08 +03:00
tidy-up: add missing newline to error msg, formatting
Also: - fix indent - lowercase variables names - fix formatting in `src/global.c` Cherry-picked from #1017
This commit is contained in:
@ -455,7 +455,7 @@ void stop_openssh_fixture(void)
|
||||
running_container_id = NULL;
|
||||
}
|
||||
else if(have_docker) {
|
||||
fprintf(stderr, "Cannot stop container - none started");
|
||||
fprintf(stderr, "Cannot stop container - none started\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "runner.h"
|
||||
|
||||
static const char *USERNAME = "libssh2"; /* set in Dockerfile */
|
||||
static const char *KEY_FILE_PRIVATE = "key_rsa";
|
||||
static const char *KEY_FILE_PUBLIC = "key_rsa.pub"; /* set in Dockerfile */
|
||||
static const char *username = "libssh2"; /* set in Dockerfile */
|
||||
static const char *key_file_private = "key_rsa";
|
||||
static const char *key_file_public = "key_rsa.pub"; /* set in Dockerfile */
|
||||
|
||||
int test(LIBSSH2_SESSION *session)
|
||||
{
|
||||
@ -10,8 +10,8 @@ int test(LIBSSH2_SESSION *session)
|
||||
LIBSSH2_CHANNEL *channel;
|
||||
|
||||
const char *userauth_list =
|
||||
libssh2_userauth_list(session, USERNAME,
|
||||
(unsigned int)strlen(USERNAME));
|
||||
libssh2_userauth_list(session, username,
|
||||
(unsigned int)strlen(username));
|
||||
if(!userauth_list) {
|
||||
print_last_session_error("libssh2_userauth_list");
|
||||
return 1;
|
||||
@ -23,10 +23,10 @@ int test(LIBSSH2_SESSION *session)
|
||||
return 1;
|
||||
}
|
||||
|
||||
rc = libssh2_userauth_publickey_fromfile_ex(session, USERNAME,
|
||||
(unsigned int)strlen(USERNAME),
|
||||
srcdir_path(KEY_FILE_PUBLIC),
|
||||
srcdir_path(KEY_FILE_PRIVATE),
|
||||
rc = libssh2_userauth_publickey_fromfile_ex(session, username,
|
||||
(unsigned int)strlen(username),
|
||||
srcdir_path(key_file_public),
|
||||
srcdir_path(key_file_private),
|
||||
NULL);
|
||||
if(rc) {
|
||||
print_last_session_error("libssh2_userauth_publickey_fromfile_ex");
|
||||
|
@ -5,9 +5,9 @@
|
||||
#include <stdlib.h> /* for getenv() */
|
||||
|
||||
/* set in Dockerfile */
|
||||
static const char *USERNAME = "libssh2";
|
||||
static const char *KEY_FILE_PRIVATE = "key_rsa";
|
||||
static const char *KEY_FILE_PUBLIC = "key_rsa.pub";
|
||||
static const char *username = "libssh2";
|
||||
static const char *key_file_private = "key_rsa";
|
||||
static const char *key_file_public = "key_rsa.pub";
|
||||
|
||||
int test(LIBSSH2_SESSION *session)
|
||||
{
|
||||
@ -29,8 +29,8 @@ int test(LIBSSH2_SESSION *session)
|
||||
const char *env;
|
||||
|
||||
const char *userauth_list =
|
||||
libssh2_userauth_list(session, USERNAME,
|
||||
(unsigned int)strlen(USERNAME));
|
||||
libssh2_userauth_list(session, username,
|
||||
(unsigned int)strlen(username));
|
||||
if(!userauth_list) {
|
||||
print_last_session_error("libssh2_userauth_list");
|
||||
return 1;
|
||||
@ -42,10 +42,10 @@ int test(LIBSSH2_SESSION *session)
|
||||
return 1;
|
||||
}
|
||||
|
||||
rc = libssh2_userauth_publickey_fromfile_ex(session, USERNAME,
|
||||
(unsigned int)strlen(USERNAME),
|
||||
srcdir_path(KEY_FILE_PUBLIC),
|
||||
srcdir_path(KEY_FILE_PRIVATE),
|
||||
rc = libssh2_userauth_publickey_fromfile_ex(session, username,
|
||||
(unsigned int)strlen(username),
|
||||
srcdir_path(key_file_public),
|
||||
srcdir_path(key_file_private),
|
||||
NULL);
|
||||
if(rc) {
|
||||
print_last_session_error("libssh2_userauth_publickey_fromfile_ex");
|
||||
|
Reference in New Issue
Block a user