aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/fileupload.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/fileupload.c')
-rw-r--r--docs/examples/fileupload.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/examples/fileupload.c b/docs/examples/fileupload.c
index cb88ef687..6ed523c36 100644
--- a/docs/examples/fileupload.c
+++ b/docs/examples/fileupload.c
@@ -27,7 +27,11 @@ int main(void)
return 1; /* can't continue */
}
- stat("debugit", &file_info); /* to get the file size */
+ /* to get the file size */
+ if(fstat(fileno(fd), &file_info) != 0) {
+
+ return 1; /* can't continue */
+ }
curl = curl_easy_init();
if(curl) {