aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-12 03:24:27 +0000
committerYang Tse <yangsita@gmail.com>2008-09-12 03:24:27 +0000
commit2bcd13aaee0476a6b3e63cb600bad2dd0ca593f2 (patch)
tree696b9c91f1210f90ecdd2268389ac53c386dec09
parent20723cb7927731f7ade0d86985313e2ad12a5be1 (diff)
ANSI C compatibility fix
-rw-r--r--lib/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/file.c b/lib/file.c
index 5e652001b..9b9ef2be3 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -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) {