Bug 1197215 - Remove now unnecessary uses of ok in the predictor. r=hurley
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 21 Aug 2015 20:38:58 +0200
changeset 287169 4c14cdd926f9969fa875dd2d9d9d69274615fc64
parent 287168 581329d6602b9dc55cb16f0c089557e981214ed5
child 287170 28f4e829b1e6b69259c1162b930a4768df9d937b
push id4660
push usermartin.thomson@gmail.com
push dateFri, 21 Aug 2015 22:37:38 +0000
reviewershurley
bugs1197215
milestone43.0a1
Bug 1197215 - Remove now unnecessary uses of ok in the predictor. r=hurley
netwerk/base/Predictor.cpp
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -1510,29 +1510,29 @@ Predictor::SpaceCleaner::OnMetaDataEleme
     nsKey.AssignASCII(key);
     mLongKeysToDelete.AppendElement(nsKey);
     return NS_OK;
   }
 
   nsCString uri;
   nsresult rv = parsedURI->GetAsciiSpec(uri);
   uint32_t uriLength = uri.Length();
-  if (ok && NS_SUCCEEDED(rv) &&
+  if (NS_SUCCEEDED(rv) &&
       uriLength > mPredictor->mMaxURILength) {
     // Default to getting rid of URIs that are too long and were put in before
     // we had our limit on URI length, in order to free up some space.
     nsCString nsKey;
     nsKey.AssignASCII(key);
     mLongKeysToDelete.AppendElement(nsKey);
     return NS_OK;
   }
 
-  if (!ok || !mLRUKeyToDelete || lastHit < mLRUStamp) {
+  if (!mLRUKeyToDelete || lastHit < mLRUStamp) {
     mLRUKeyToDelete = key;
-    mLRUStamp = ok ? lastHit : 0;
+    mLRUStamp = lastHit;
   }
 
   return NS_OK;
 }
 
 void
 Predictor::SpaceCleaner::Finalize(nsICacheEntry *entry)
 {