From: Max Kellermann Date: Fri, 14 Aug 2009 21:44:06 +0000 (+0200) Subject: options: removed NULL checks before g_free() X-Git-Tag: release-0.15~38 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=18a80371ad334faa0777fcb1b53fc0037f426eba;p=ncmpc.git options: removed NULL checks before g_free() g_free() handles NULL parameters well. --- diff --git a/src/options.c b/src/options.c index 5d8b1fd..c4540d3 100644 --- a/src/options.c +++ b/src/options.c @@ -251,23 +251,19 @@ handle_option(int c, const char *arg) options.port = atoi(arg); break; case 'h': /* --host */ - if( options.host ) - g_free(options.host); + g_free(options.host); options.host = g_strdup(arg); break; case 'P': /* --password */ - if( options.password ) - g_free(options.password); + g_free(options.password); options.password = locale_to_utf8(arg); break; case 'f': /* --config */ - if( options.config_file ) - g_free(options.config_file); + g_free(options.config_file); options.config_file = g_strdup(arg); break; case 'k': /* --key-file */ - if( options.key_file ) - g_free(options.key_file); + g_free(options.key_file); options.key_file = g_strdup(arg); break; case 'S': /* --key-file */