From b33bb28ea3218399d6023a8f3fd2f9a86a3dec41 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 30 Jul 2011 19:03:20 +0300 Subject: build: fix --enable-debug, remove some "#ifdef MP_DEBUG" Recent commit 5d5ca22a6d ("options: commandline: accept --foo=xyz style options") left some bad code under "#ifdef MP_DEBUG" in playtree.c, which caused a compilation failure if configured with "--enable-debug". Fix this. Having the "#ifdef MP_DEBUG" there was completely unnecessary; it only increased the risk for this kind of problems for no real benefit - executing the asserts under it would have no noticeable performance or other penalty in default builds either. Remove several cases of such harmful "#ifdef MP_DEBUG". --- playtreeparser.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'playtreeparser.c') diff --git a/playtreeparser.c b/playtreeparser.c index 14220274de..aea0241ca4 100644 --- a/playtreeparser.c +++ b/playtreeparser.c @@ -805,9 +805,7 @@ parse_playtree(stream_t *stream, struct m_config *mconfig, int forced) { play_tree_parser_t* p; play_tree_t* ret; -#ifdef MP_DEBUG assert(stream != NULL); -#endif p = play_tree_parser_new(stream, mconfig, 0); if(!p) @@ -924,9 +922,7 @@ play_tree_parser_new(stream_t* stream, struct m_config *mconfig, int deep) { void play_tree_parser_free(play_tree_parser_t* p) { -#ifdef MP_DEBUG assert(p != NULL); -#endif free(p->buffer); free(p->line); @@ -937,10 +933,7 @@ play_tree_t* play_tree_parser_get_play_tree(play_tree_parser_t* p, int forced) { play_tree_t* tree = NULL; -#ifdef MP_DEBUG assert(p != NULL); -#endif - while(play_tree_parser_get_line(p) != NULL) { play_tree_parser_reset(p); -- cgit v1.2.3