Bug 1273965 part 3: Collapse & de-indent another else-after-return in MediaPipelineFactory.cpp, and drop a now-clearly-unnecessary NS_NOTREACHED. r?bwc draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 18 May 2016 10:56:00 -0700
changeset 368404 d0b8c25b03e851d66a006f85c66952d4bf5ab694
parent 368403 dea51712449bcba3d18412ef4f416a78f2a14659
child 521263 568f8b66cbc67882bc092cd50d77856f5f89ed0d
push id18525
push userdholbert@mozilla.com
push dateWed, 18 May 2016 17:56:35 +0000
reviewersbwc
bugs1273965
milestone49.0a1
Bug 1273965 part 3: Collapse & de-indent another else-after-return in MediaPipelineFactory.cpp, and drop a now-clearly-unnecessary NS_NOTREACHED. r?bwc MozReview-Commit-ID: 6K4ng30gGPC
media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp
--- a/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp
+++ b/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp
@@ -1004,19 +1004,16 @@ MediaPipelineFactory::EnsureExternalCode
       OMXVideoCodec::CreateDecoder(OMXVideoCodec::CodecType::CODEC_H264);
 #else
     decoder = GmpVideoCodec::CreateDecoder();
 #endif
     if (decoder) {
       return aConduit.SetExternalRecvCodec(aConfig, decoder);
     }
     return kMediaConduitInvalidReceiveCodec;
-  } else {
-    MOZ_MTLOG(ML_ERROR,
-              "Invalid video codec configured: " << aConfig->mName.c_str());
-    return aIsSend ? kMediaConduitInvalidSendCodec
-                   : kMediaConduitInvalidReceiveCodec;
   }
-
-  NS_NOTREACHED("Shouldn't get here!");
+  MOZ_MTLOG(ML_ERROR,
+            "Invalid video codec configured: " << aConfig->mName.c_str());
+  return aIsSend ? kMediaConduitInvalidSendCodec
+                 : kMediaConduitInvalidReceiveCodec;
 }
 
 } // namespace mozilla