From 18a80371ad334faa0777fcb1b53fc0037f426eba Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 14 Aug 2009 23:44:06 +0200 Subject: [PATCH] options: removed NULL checks before g_free() g_free() handles NULL parameters well. --- src/options.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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 */ -- 2.30.2