[vlc-commits] Do not compare arrays against NULL (always true)

Rémi Duraffort git at videolan.org
Fri Aug 9 10:37:22 CEST 2013


vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jul 26 19:56:51 2013 +0200| [4352f59c418587de8265eab5bf7fb0a08c78b00c] | committer: Jean-Baptiste Kempf

Do not compare arrays against NULL (always true)

Fix cid #1048854

(cherry picked from commit 7d78c4e0ca3d7b17d797096236fe1f4840843a92)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=4352f59c418587de8265eab5bf7fb0a08c78b00c
---

 src/misc/fourcc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 1b4b299..3da1e2b 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -1459,7 +1459,7 @@ static entry_t Lookup( const staticentry_t p_list[], vlc_fourcc_t i_fourcc )
 
             memcpy( e.p_class, p_class, 4 );
             memcpy( e.p_fourcc, p->p_fourcc, 4 );
-            e.psz_description = p->psz_description ?
+            e.psz_description = p->psz_description[0] != '\0' ?
                                 p->psz_description : psz_description;
             break;
         }



More information about the vlc-commits mailing list