diff options
author | cboesch <cboesch@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-11-14 09:12:34 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-14 13:11:20 +0200 |
commit | fe3c4810e1c8b535caf07df8e4434e322d3e6fc0 (patch) | |
tree | cbcd859f358c479223eb7b0aa2a2d3dfe1c81b69 /libmenu/menu_cmdlist.c | |
parent | b492561241f2a3263a8ab558fafc957130dbdfc1 (diff) | |
download | mpv-fe3c4810e1c8b535caf07df8e4434e322d3e6fc0.tar.bz2 mpv-fe3c4810e1c8b535caf07df8e4434e322d3e6fc0.tar.xz |
cleanup: remove NULL checks before free() all over the code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmenu/menu_cmdlist.c')
-rw-r--r-- | libmenu/menu_cmdlist.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libmenu/menu_cmdlist.c b/libmenu/menu_cmdlist.c index d09c45fc8d..5b7812be5e 100644 --- a/libmenu/menu_cmdlist.c +++ b/libmenu/menu_cmdlist.c @@ -93,14 +93,10 @@ static void read_cmd(menu_t* menu,int cmd) { } static void free_entry(list_entry_t* entry) { - if(entry->ok) - free(entry->ok); - if(entry->cancel) - free(entry->cancel); - if(entry->left) - free(entry->left); - if(entry->right) - free(entry->right); + free(entry->ok); + free(entry->cancel); + free(entry->left); + free(entry->right); free(entry->p.txt); free(entry); } @@ -132,7 +128,7 @@ static int parse_args(menu_t* menu,char* args) { if(!name) { mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] List menu entry definitions need a name (line %d).\n",parser->line); free(element); - if(body) free(body); + free(body); asx_free_attribs(attribs); continue; } @@ -145,7 +141,7 @@ static int parse_args(menu_t* menu,char* args) { menu_list_add_entry(menu,m); free(element); - if(body) free(body); + free(body); asx_free_attribs(attribs); } } |