mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-04 09:22:28 +03:00
tidy-up: avoid exclamations, prefer single quotes, in outputs
Closes #1079
This commit is contained in:
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
*/
|
||||
sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if(sock == LIBSSH2_INVALID_SOCKET) {
|
||||
fprintf(stderr, "failed to create socket!\n");
|
||||
fprintf(stderr, "failed to create socket.\n");
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
@ -89,14 +89,14 @@ int main(int argc, char *argv[])
|
||||
sin.sin_port = htons(22);
|
||||
sin.sin_addr.s_addr = hostaddr;
|
||||
if(connect(sock, (struct sockaddr*)(&sin), sizeof(struct sockaddr_in))) {
|
||||
fprintf(stderr, "failed to connect!\n");
|
||||
fprintf(stderr, "failed to connect.\n");
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
/* Create a session instance */
|
||||
session = libssh2_session_init();
|
||||
if(!session) {
|
||||
fprintf(stderr, "Could not initialize SSH session!\n");
|
||||
fprintf(stderr, "Could not initialize SSH session.\n");
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ int main(int argc, char *argv[])
|
||||
if(auth_pw) {
|
||||
/* We could authenticate via password */
|
||||
if(libssh2_userauth_password(session, username, password)) {
|
||||
fprintf(stderr, "Authentication by password failed!\n");
|
||||
fprintf(stderr, "Authentication by password failed.\n");
|
||||
goto shutdown;
|
||||
}
|
||||
}
|
||||
@ -133,7 +133,7 @@ int main(int argc, char *argv[])
|
||||
if(libssh2_userauth_publickey_fromfile(session, username,
|
||||
pubkey, privkey,
|
||||
password)) {
|
||||
fprintf(stderr, "Authentication by public key failed!\n");
|
||||
fprintf(stderr, "Authentication by public key failed.\n");
|
||||
goto shutdown;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user