Skip to content

Commit 813ec26

Browse files
fix for scan-build report of unused return value
1 parent 2a11471 commit 813ec26

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

examples/sftpclient/sftpclient.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,11 @@ static int doCmds(func_args* args)
566566
}
567567

568568
do {
569-
while (wolfSSH_get_error(ssh) == WS_REKEYING) {
569+
while (ret == WS_REKEYING || ssh->error == WS_REKEYING) {
570570
ret = wolfSSH_worker(ssh, NULL);
571+
if (ret != WS_SUCCESS && ret == WS_FATAL_ERROR) {
572+
ret = wolfSSH_get_error(ssh);
573+
}
571574
}
572575

573576
ret = wolfSSH_SFTP_Get(ssh, pt, to, resume, &myStatusCb);

0 commit comments

Comments
 (0)