diff options
author | Mukund Sivaraman <muks@banu.com> | 2009-09-23 07:28:20 +0530 |
---|---|---|
committer | Mukund Sivaraman <muks@banu.com> | 2009-09-27 08:09:23 +0530 |
commit | 0ecb6882694661cc45f82a9ebe5d9ae4a14186c0 (patch) | |
tree | 2bf8086153835921b6493f3db51026d6b53dc520 /src | |
parent | 1586b39138a56717a92d9ef7af3f521d54f8accc (diff) | |
download | tinyproxy-0ecb6882694661cc45f82a9ebe5d9ae4a14186c0.tar.gz tinyproxy-0ecb6882694661cc45f82a9ebe5d9ae4a14186c0.zip |
Don't ignore retval of ftruncate() in utils.c
Diffstat (limited to '')
-rw-r--r-- | src/utils.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c index 679d027..239952c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -28,6 +28,7 @@ #include "conns.h" #include "heap.h" #include "http-message.h" +#include "log.h" #include "utils.h" /* @@ -158,7 +159,10 @@ int create_file_safely (const char *filename, unsigned int truncate_file) * ("Little sympathy has been extended") */ #ifdef HAVE_FTRUNCATE - ftruncate (fildes, 0); + if (ftruncate (fildes, 0) != 0) { + log_message (LOG_WARNING, + "Unable to truncate file '%s'", filename); + } #else close (fildes); if ((fildes = |