summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8c3fd75)
raw | patch | inline | side by side (parent: 8c3fd75)
author | Max Kellermann <max@duempel.org> | |
Fri, 14 Aug 2009 21:44:06 +0000 (23:44 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 14 Aug 2009 21:44:06 +0000 (23:44 +0200) |
g_free() handles NULL parameters well.
src/options.c | patch | blob | history |
diff --git a/src/options.c b/src/options.c
index 5d8b1fda448cac033905d64a5ff602a94c6926be..c4540d38f25f17b42859b94c1e1bd2279ed97738 100644 (file)
--- a/src/options.c
+++ b/src/options.c
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 */