Bug 1363336 - eliminate useless null-check in for |fd|. r?dragana draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 09 May 2017 16:37:05 +0300
changeset 574856 f53867d9c08b53c79968c9bcce36ec193f8c0f19
parent 574065 1fda52a1f3b81cf1a821155998dca637bb64e3d9
child 627715 53a21df71bb5544a17439ac44786d4f069c4380a
push id57833
push userbmo:bpostelnicu@mozilla.com
push dateTue, 09 May 2017 13:37:39 +0000
reviewersdragana
bugs1363336
milestone55.0a1
Bug 1363336 - eliminate useless null-check in for |fd|. r?dragana MozReview-Commit-ID: KQGPjDMviuj
netwerk/base/nsSocketTransport2.cpp
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -1520,17 +1520,17 @@ nsSocketTransport::InitiateSocket()
     // nsIOService::LastOfflineStateChange time and
     // nsIOService::LastConectivityChange time to be atomic.
     PRIntervalTime connectStarted = 0;
     if (gSocketTransportService->IsTelemetryEnabledAndNotSleepPhase()) {
         connectStarted = PR_IntervalNow();
     }
 
     bool tfo = false;
-    if (fd && mFastOpenCallback &&
+    if (mFastOpenCallback &&
         mFastOpenCallback->FastOpenEnabled()) {
         if (NS_SUCCEEDED(AttachTCPFastOpenIOLayer(fd))) {
             tfo = true;
             SOCKET_LOG(("nsSocketTransport::InitiateSocket TCP Fast Open "
                         "started [this=%p]\n", this));
         }
     }