]> granicus.if.org Git - curl/commitdiff
tool_operate: Expression 'config->resume_from' is always true
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 Sep 2019 08:33:56 +0000 (10:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Sep 2019 06:07:58 +0000 (08:07 +0200)
Fixes warning detected by PVS-Studio
Fixes #4374

src/tool_operate.c

index 09dfc0c84cd88597e0eb47e152bc8f0049cc524f..5364e830726e33f151713bb63b6611a162f701cf 100644 (file)
@@ -977,11 +977,11 @@ static CURLcode create_transfers(struct GlobalConfig *global,
 #ifdef __VMS
             /* open file for output, forcing VMS output format into stream
                mode which is needed for stat() call above to always work. */
-            FILE *file = fopen(outfile, config->resume_from?"ab":"wb",
+            FILE *file = fopen(outfile, "ab",
                                "ctx=stm", "rfm=stmlf", "rat=cr", "mrs=0");
 #else
             /* open file for output: */
-            FILE *file = fopen(per->outfile, config->resume_from?"ab":"wb");
+            FILE *file = fopen(per->outfile, "ab");
 #endif
             if(!file) {
               helpf(global->errors, "Can't open '%s'!\n", per->outfile);