summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2009-09-23 07:18:14 +0530
committerMukund Sivaraman <muks@banu.com>2009-09-27 08:09:22 +0530
commit616c03a9fbe0a72e65d02dc50b5b4cf500971187 (patch)
treed6023f19eebae746230c41ae7958c253bf2ecf89
parentfc7415a5b0c53ed40a1ed64a00e1fde7f7b35646 (diff)
downloadtinyproxy-616c03a9fbe0a72e65d02dc50b5b4cf500971187.tar.gz
tinyproxy-616c03a9fbe0a72e65d02dc50b5b4cf500971187.zip
Don't ignore retval of ftruncate() in log.c
Diffstat (limited to '')
-rw-r--r--src/log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/log.c b/src/log.c
index 91e94ba..6f94ab0 100644
--- a/src/log.c
+++ b/src/log.c
@@ -84,7 +84,10 @@ void close_log_file (void)
void truncate_log_file (void)
{
lseek (log_file_fd, 0, SEEK_SET);
- ftruncate (log_file_fd, 0);
+ if (ftruncate (log_file_fd, 0) != 0) {
+ log_message (LOG_WARNING,
+ "Unable to truncate log file to zero length");
+ }
}
/*