[vlc-devel] [PATCH 1/3] npapi: remove redundant checks

Daniel Amm da2424 at t-online.de
Thu May 21 20:24:18 CEST 2015


---
 npapi/npruntime/npolibvlc.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/npapi/npruntime/npolibvlc.cpp b/npapi/npruntime/npolibvlc.cpp
index 598995a..5329e8c 100644
--- a/npapi/npruntime/npolibvlc.cpp
+++ b/npapi/npruntime/npolibvlc.cpp
@@ -308,8 +308,8 @@ LibvlcAudioNPObject::setProperty(int index, const NPVariant &value)
                     auto tracks = mp.audioTrackDescription();
                     if ( v >= tracks.size() )
                         return INVOKERESULT_INVALID_VALUE;
-                    if ( mp.setAudioTrack( tracks[v].id() ) )
-                        return INVOKERESULT_NO_ERROR;
+                    mp.setAudioTrack( tracks[v].id() );
+                    return INVOKERESULT_NO_ERROR;
                 }
                 return INVOKERESULT_INVALID_VALUE;
             case ID_audio_channel:
@@ -1209,8 +1209,8 @@ LibvlcSubtitleNPObject::setProperty(int index, const NPVariant &value)
                     auto tracks = mp.spuDescription();
                     if ( v >= tracks.size() )
                         return INVOKERESULT_INVALID_ARGS;
-                    if ( mp.setSpu( tracks[ v ].id() ) )
-                        return INVOKERESULT_NO_ERROR;
+                    mp.setSpu( tracks[ v ].id() );
+                    return INVOKERESULT_NO_ERROR;
                 }
                 return INVOKERESULT_INVALID_VALUE;
             }
-- 
2.1.4




More information about the vlc-devel mailing list