From 031c4c76f4e3f7ae1670ef41292a71264961996f Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Sun, 26 Oct 2014 11:15:28 +0900 Subject: [PATCH] chapter: Remove redundant 'if' for freeing. --- core/chapter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/chapter.c b/core/chapter.c index ea1b4ed..f45583f 100644 --- a/core/chapter.c +++ b/core/chapter.c @@ -190,7 +190,7 @@ int lsmash_set_tyrant_chapter( lsmash_root_t *root, char *file_name, int add_bom || (!file->moov->udta->chpl && !isom_add_chpl( file->moov->udta )) ) goto fail; file->moov->udta->chpl->version = 1; /* version = 1 is popular. */ - isom_chapter_entry_t data = {0}; + isom_chapter_entry_t data = { 0 }; while( !fnc( chapter, &data ) ) { if( add_bom ) @@ -218,8 +218,7 @@ int lsmash_set_tyrant_chapter( lsmash_root_t *root, char *file_name, int add_bom fclose( chapter ); return 0; fail2: - if( data.chapter_name ) - lsmash_free( data.chapter_name ); + lsmash_free( data.chapter_name ); fail: fclose( chapter ); error_message: -- 2.11.4.GIT