]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ftp: remove redundant null pointer check in loop condition
authormartinevsky <max@martinevsky.ru>
Fri, 19 Jul 2024 13:46:25 +0000 (16:46 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 19 Jul 2024 16:24:45 +0000 (18:24 +0200)
Closes #14234

lib/ftp.c

index f048a63f39f0bdea6abb81401115a70a87d1480e..ae340c44af533c30a165436d1ea45c9cb0748665 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1354,7 +1354,7 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data,
       char *dest = target;
 
       /* translate x.x.x.x to x,x,x,x */
-      while(source && *source) {
+      while(*source) {
         if(*source == '.')
           *dest = ',';
         else