]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ANSI C compatibility fix
authorYang Tse <yangsita@gmail.com>
Fri, 12 Sep 2008 03:24:27 +0000 (03:24 +0000)
committerYang Tse <yangsita@gmail.com>
Fri, 12 Sep 2008 03:24:27 +0000 (03:24 +0000)
lib/file.c

index 5e652001b9db084128afdc6dea5f6e7734e22f07..9b9ef2be39a6922224cf9d0d70d4e719adaadfde 100644 (file)
@@ -333,7 +333,8 @@ static CURLcode file_upload(struct connectdata *conn)
       failf(data, "Can't open %s for writing", file->path);
       return CURLE_WRITE_ERROR;
     }
-    fp = fdopen(fd, "wb");
+    close(fd);
+    fp = fopen(file->path, "wb");
   }
 
   if(!fp) {