X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp.c;h=25f05a4c7e3944ea538082637cab693e7e5c349c;hp=2db98bb99066ef54960789dc7142a1208a6d7d92;hb=38a7829dcb4eb5dba28dbf0f05c6a80fea9217f8;hpb=351e438e5109856d8e97af19583e655aa2f1bb4c diff --git a/src/ftp.c b/src/ftp.c index 2db98bb9..25f05a4c 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -990,15 +990,14 @@ Error in server response, closing control connection.\n")); if (opt.spider) { bool exists = false; - uerr_t res; struct fileinfo *f; - res = ftp_get_listing (u, con, &f); + uerr_t _res = ftp_get_listing (u, con, &f); /* Set the DO_RETR command flag again, because it gets unset when calling ftp_get_listing() and would otherwise cause an assertion failure earlier on when this function gets repeatedly called (e.g., when recursing). */ con->cmd |= DO_RETR; - if (res == RETROK) + if (_res == RETROK) { while (f) { @@ -1235,8 +1234,7 @@ Error in server response, closing control connection.\n")); { if (opt.unlink && file_exists_p (con->target)) { - int res = unlink (con->target); - if (res < 0) + if (unlink (con->target) < 0) { logprintf (LOG_NOTQUIET, "%s: %s\n", con->target, strerror (errno));