Repository: trafficserver
Updated Branches:
  refs/heads/6.1.x ec22b6f9f -> 85013c390


TS-4190 Fix potential null reference found by clang-analyzaer.

This closes #482

(cherry picked from commit 9be03cfbf92b058ea0a160027b35d0879695ae59)


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

Branch: refs/heads/6.1.x
Commit: 85013c390974c5d39c092733e38df741f15a1cf2
Parents: ec22b6f
Author: John J. Rushford <[email protected]>
Authored: Tue Feb 16 18:28:31 2016 +0000
Committer: Leif Hedstrom <[email protected]>
Committed: Tue Feb 16 11:39:30 2016 -0700

----------------------------------------------------------------------
 proxy/ParentConsistentHash.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/85013c39/proxy/ParentConsistentHash.cc
----------------------------------------------------------------------
diff --git a/proxy/ParentConsistentHash.cc b/proxy/ParentConsistentHash.cc
index 2b41831..6233bdc 100644
--- a/proxy/ParentConsistentHash.cc
+++ b/proxy/ParentConsistentHash.cc
@@ -196,7 +196,7 @@ ParentConsistentHash::selectParent(const 
ParentSelectionPolicy *policy, bool fir
   }
 
   // use the available or marked for retry parent.
-  if ((pRec && pRec->available) || result->retry) {
+  if (pRec && (pRec->available || result->retry)) {
     result->r = PARENT_SPECIFIED;
     result->hostname = pRec->hostname;
     result->port = pRec->port;

Reply via email to