From 616c03a9fbe0a72e65d02dc50b5b4cf500971187 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 23 Sep 2009 07:18:14 +0530 Subject: Don't ignore retval of ftruncate() in log.c --- src/log.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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"); + } } /* -- cgit v1.2.3