mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-03-24 20:40:09 +09:00
examples: Use separate variable for exit code
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Eshan Kelkar <eshankelkar@galorithm.com>
This commit is contained in:
@@ -322,7 +322,7 @@ list_fingerprint(char *file)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
ssh_key key = NULL;
|
||||
int rc = 0, fd;
|
||||
int ret = EXIT_FAILURE, rc, fd;
|
||||
char overwrite[1024] = "";
|
||||
|
||||
char *pubkey_file = NULL;
|
||||
@@ -500,6 +500,8 @@ int main(int argc, char *argv[])
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = EXIT_SUCCESS;
|
||||
|
||||
end:
|
||||
if (key != NULL) {
|
||||
ssh_key_free(key);
|
||||
@@ -521,5 +523,5 @@ end:
|
||||
if (pubkey_file != NULL) {
|
||||
free(pubkey_file);
|
||||
}
|
||||
return rc;
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user