From: Daniel Stenberg Date: Fri, 13 Jul 2012 12:12:39 +0000 (+0200) Subject: ftp_do_more: add missing check of return code X-Git-Tag: curl-7_27_0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20ff8a0988d844910ff3621f75f99907aebeef4b;p=thirdparty%2Fcurl.git ftp_do_more: add missing check of return code Spotted by clang-analyzer. The return code was never checked, just stored. --- diff --git a/lib/ftp.c b/lib/ftp.c index 3a494535d6..438ccfc0f2 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -3674,8 +3674,11 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete) /* It looks data connection is established */ result = AcceptServerConnect(conn); ftpc->wait_data_conn = FALSE; - if(result == CURLE_OK) + if(!result) result = InitiateTransfer(conn); + + if(result) + return result; } } else if(data->set.upload) {