From: Francesco Chemolli Date: Thu, 9 Jul 2015 08:28:20 +0000 (+0200) Subject: Fix Coverity defect 740321: unchecked library return value in debug.cc X-Git-Tag: merge-candidate-3-v1~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=595d16374574159003a67e4b8c998d7c13decc19;p=thirdparty%2Fsquid.git Fix Coverity defect 740321: unchecked library return value in debug.cc --- diff --git a/src/debug.cc b/src/debug.cc index c045e498d1..5d573a8abb 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -468,7 +468,10 @@ _db_rotate_log(void) remove (to); #endif - rename(from, to); + errno = 0; + if (rename(from, to) == -1) { + debugs(0, DBG_IMPORTANT, "log rotation failed: " << xstrerror()); + } } /*