1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-31 00:03:08 +03:00

tidy-up: replace exit() with return

In examples and the manual page for `libssh2_version()`.

Closes #1541
This commit is contained in:
Viktor Szakats
2025-02-13 12:24:29 +01:00
parent 9642a96ef7
commit a751d578be
4 changed files with 14 additions and 14 deletions

View File

@ -232,7 +232,7 @@ int main(int argc, char *argv[])
} while(1);
if(!channel) {
fprintf(stderr, "Error\n");
exit(1);
return 1;
}
while((rc = libssh2_channel_exec(channel, commandline)) ==
LIBSSH2_ERROR_EAGAIN) {
@ -240,7 +240,7 @@ int main(int argc, char *argv[])
}
if(rc) {
fprintf(stderr, "exec error\n");
exit(1);
return 1;
}
for(;;) {
ssize_t nread;