--HG--
branch : coverity
This commit is contained in:
Matt Johnston
2016-03-15 23:20:40 +08:00
4 changed files with 7 additions and 6 deletions

View File

@@ -186,7 +186,7 @@ static void ask_to_confirm(unsigned char* keyblob, unsigned int keybloblen,
char* fp = NULL;
FILE *tty = NULL;
char response = 'z';
int response = 'z';
fp = sign_key_fingerprint(keyblob, keybloblen);
if (cli_opts.always_accept_key) {

View File

@@ -361,9 +361,10 @@ static void cli_session_cleanup(void) {
/* Set std{in,out,err} back to non-blocking - busybox ash dies nastily if
* we don't revert the flags */
fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags);
fcntl(cli_ses.stdoutcopy, F_SETFL, cli_ses.stdoutflags);
fcntl(cli_ses.stderrcopy, F_SETFL, cli_ses.stderrflags);
/* Ignore return value since there's nothing we can do */
(void)fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags);
(void)fcntl(cli_ses.stdoutcopy, F_SETFL, cli_ses.stdoutflags);
(void)fcntl(cli_ses.stderrcopy, F_SETFL, cli_ses.stderrflags);
cli_tty_cleanup();

View File

@@ -138,7 +138,7 @@ static void svr_ensure_hostkey() {
break;
#endif
default:
(void)0;
dropbear_assert(0);
}
if (readhostkey(fn, svr_opts.hostkey, &type) == DROPBEAR_SUCCESS) {

View File

@@ -119,7 +119,7 @@ fail:
/* cleanup */
m_free(chansess->x11authprot);
m_free(chansess->x11authcookie);
close(fd);
m_close(fd);
return DROPBEAR_FAILURE;
}