Repository: trafficserver
Updated Branches:
  refs/heads/master 057ef2b17 -> 83bd4c3c9


TS-1475 Make sure not to use unitialized config, reported from clang


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/83bd4c3c
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/83bd4c3c
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/83bd4c3c

Branch: refs/heads/master
Commit: 83bd4c3c9a31f1943df07002885f55bd69fbdfbb
Parents: 057ef2b
Author: Leif Hedstrom <[email protected]>
Authored: Mon Jul 14 11:12:59 2014 -0600
Committer: Leif Hedstrom <[email protected]>
Committed: Mon Jul 14 11:13:00 2014 -0600

----------------------------------------------------------------------
 proxy/logging/Log.cc | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/83bd4c3c/proxy/logging/Log.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/Log.cc b/proxy/logging/Log.cc
index 9ee618e..0c6b5b6 100644
--- a/proxy/logging/Log.cc
+++ b/proxy/logging/Log.cc
@@ -1191,17 +1191,17 @@ Log::preproc_thread_main(void *args)
     size_t buffers_preproced = 0;
     LogConfig * current = (LogConfig *)configProcessor.get(log_configid);
 
-    if (current) {
+    if (likely(current)) {
       buffers_preproced = current->log_object_manager.preproc_buffers(idx);
-    }
 
-    // config->increment_space_used(bytes_to_disk);
-    // TODO: the bytes_to_disk should be set to Log
+      // config->increment_space_used(bytes_to_disk);
+      // TODO: the bytes_to_disk should be set to Log
 
-    Debug("log-preproc","%zu buffers preprocessed from LogConfig %p 
(refcount=%d) this round",
-          buffers_preproced, current, current->m_refcount);
+      Debug("log-preproc","%zu buffers preprocessed from LogConfig %p 
(refcount=%d) this round",
+            buffers_preproced, current, current->m_refcount);
 
-    configProcessor.release(log_configid, current);
+      configProcessor.release(log_configid, current);
+    }
 
     // wait for more work; a spurious wake-up is ok since we'll just
     // check the queue and find there is nothing to do, then wait

Reply via email to