png: split up assignment and comparison
authorTristan Matthews <le.businessman@gmail.com>
Thu, 20 Feb 2014 14:09:32 +0000 (09:09 -0500)
committerTristan Matthews <le.businessman@gmail.com>
Thu, 20 Feb 2014 14:09:32 +0000 (09:09 -0500)
modules/codec/png.c

index 6a20b82..4381f47 100644 (file)
@@ -116,7 +116,8 @@ static int OpenDecoder( vlc_object_t *p_this )
     }
 
     /* Allocate the memory needed to store the decoder's structure */
-    if( ( p_dec->p_sys = malloc(sizeof(decoder_sys_t)) ) == NULL )
+    p_dec->p_sys = malloc( sizeof(decoder_sys_t) );
+    if( p_dec->p_sys == NULL )
         return VLC_ENOMEM;
 
     p_dec->p_sys->p_obj = p_this;