mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
Fix some compiler warnings
Covscan analyzer was used
Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 63f97a3d03)
This commit is contained in:
committed by
Jakub Jelen
parent
2dda3514d1
commit
a629f687cd
@@ -255,7 +255,11 @@ int ssh_getpass(const char *prompt,
|
||||
|
||||
/* disable nonblocking I/O */
|
||||
if (fd & O_NDELAY) {
|
||||
fcntl(0, F_SETFL, fd & ~O_NDELAY);
|
||||
ok = fcntl(0, F_SETFL, fd & ~O_NDELAY);
|
||||
if (ok < 0) {
|
||||
perror("fcntl");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
ok = ssh_gets(prompt, buf, len, verify);
|
||||
@@ -267,7 +271,11 @@ int ssh_getpass(const char *prompt,
|
||||
|
||||
/* close fd */
|
||||
if (fd & O_NDELAY) {
|
||||
fcntl(0, F_SETFL, fd);
|
||||
ok = fcntl(0, F_SETFL, fd);
|
||||
if (ok < 0) {
|
||||
perror("fcntl");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
|
||||
Reference in New Issue
Block a user