]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix Coverity defect 740321: unchecked library return value in debug.cc
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 9 Jul 2015 08:28:20 +0000 (10:28 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 9 Jul 2015 08:28:20 +0000 (10:28 +0200)
src/debug.cc

index c045e498d111e80fe2e8d51738ee2286c44dc9df..5d573a8abb89644c5c7f0b5e7b79a9cc9586dd75 100644 (file)
@@ -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());
+        }
     }
 
     /*