aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2008-02-21 15:02:14 +0000
committerGunter Knauf <gk@gknw.de>2008-02-21 15:02:14 +0000
commit5e9c564883512130d356a81f6dcb3057572f1690 (patch)
tree0e3e761f3b0710684e5ffd3232c3bdb23d186c70 /docs
parent3bb460222787c68e19b2950e42ac0eb2ccb2b351 (diff)
fixed missing header; changed bail out from exit() to return().
Mentioned on the list by Michal Marek.
Diffstat (limited to 'docs')
-rw-r--r--docs/examples/ftpupload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index 8b29a21ec..9ce548480 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -14,6 +14,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <errno.h>
#ifdef WIN32
#include <io.h>
#else
@@ -61,7 +62,7 @@ int main(int argc, char **argv)
/* get the file size of the local file */
if(stat(LOCAL_FILE, &file_info)) {
printf("Couldnt open '%s': %s\n", LOCAL_FILE, strerror(errno));
- exit(1);
+ return 1;
}
printf("Local file size: %ld bytes.\n", file_info.st_size);