]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
file: remove useless assignment
authorDaniel Stenberg <daniel@haxx.se>
Fri, 19 Apr 2024 12:09:54 +0000 (14:09 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 19 Apr 2024 21:46:16 +0000 (23:46 +0200)
This code assigned the variable the same value it already had.

Spotted by CodeSonar

Closes #13425

lib/file.c

index 70328fabd95a3e3a7c0922d97f8136cb4ccdbe79..cae1cee59c99a0fc868b79c3f6b46ce91313bfe1 100644 (file)
@@ -455,12 +455,9 @@ static CURLcode file_do(struct Curl_easy *data, bool *done)
     fstated = TRUE;
   }
 
-  if(fstated && !data->state.range && data->set.timecondition) {
-    if(!Curl_meets_timecondition(data, data->info.filetime)) {
-      *done = TRUE;
-      return CURLE_OK;
-    }
-  }
+  if(fstated && !data->state.range && data->set.timecondition &&
+     !Curl_meets_timecondition(data, data->info.filetime))
+    return CURLE_OK;
 
   if(fstated) {
     time_t filetime;