summaryrefslogtreecommitdiffstats
path: root/usr.sbin/faithd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/faithd')
-rw-r--r--usr.sbin/faithd/ftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/faithd/ftp.c b/usr.sbin/faithd/ftp.c
index e086de6..5664681 100644
--- a/usr.sbin/faithd/ftp.c
+++ b/usr.sbin/faithd/ftp.c
@@ -237,7 +237,7 @@ ftp_activeconn()
return -1;
}
error = connect(port6, sa, sa->sa_len);
- if (port6 == -1) {
+ if (error < 0) {
close(port6);
close(port4);
close(wport4);
@@ -284,7 +284,7 @@ ftp_passiveconn()
return -1;
}
error = connect(port4, sa, sa->sa_len);
- if (port4 == -1) {
+ if (error < 0) {
close(wport6);
close(port4);
close(port6);
OpenPOWER on IntegriCloud