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

Rémi Duraffort git at videolan.org
Fri Jul 26 20:05:33 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jul 26 19:56:51 2013 +0200| [7d78c4e0ca3d7b17d797096236fe1f4840843a92] | committer: Rémi Duraffort

Do not compare arrays against NULL (always true)

Fix cid #1048854

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7d78c4e0ca3d7b17d797096236fe1f4840843a92
---

 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 b439c72..3af6e50 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -1463,7 +1463,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