[vlc-commits] mpg123: simplify NULL checks
Tristan Matthews
git at videolan.org
Tue Apr 19 18:55:17 CEST 2016
vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Tue Apr 19 12:36:05 2016 -0400| [06512bf6e5f170b61393e2323b11dc45a87a6ee7] | committer: Tristan Matthews
mpg123: simplify NULL checks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=06512bf6e5f170b61393e2323b11dc45a87a6ee7
---
modules/codec/mpg123.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/mpg123.c b/modules/codec/mpg123.c
index 8daae72..9480bc6 100644
--- a/modules/codec/mpg123.c
+++ b/modules/codec/mpg123.c
@@ -88,11 +88,11 @@ static void Flush( decoder_t *p_dec )
static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{
int i_err;
- block_t *p_block = pp_block ? *pp_block : NULL;
decoder_sys_t *p_sys = p_dec->p_sys;
- if( !pp_block || !p_block )
+ if( !pp_block || !*pp_block )
return NULL;
+ block_t *p_block = *pp_block;
if( p_block->i_buffer == 0 )
return NULL;
More information about the vlc-commits
mailing list