From: Wilfried Göesgens Date: Mon, 16 Aug 2010 19:48:03 +0000 (+0000) Subject: * edit_value(): if no environment variable specified, use "" X-Git-Tag: v8.01~889 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=c378564e923e328eb04a88d4f040cdd18cf26495 * edit_value(): if no environment variable specified, use "" * set_str_val(): don't check NULL here, expect it to be non-null. --- diff --git a/citadel/utils/setup.c b/citadel/utils/setup.c index 011351191..f69f52beb 100644 --- a/citadel/utils/setup.c +++ b/citadel/utils/setup.c @@ -842,13 +842,10 @@ void set_bool_val(int msgpos, int *ip, char *DefValue) void set_str_val(int msgpos, char *Target, char *DefValue) { - if (DefValue != NULL) - { - strprompt(setup_titles[msgpos], - setup_text[msgpos], - Target, - DefValue); - } + strprompt(setup_titles[msgpos], + setup_text[msgpos], + Target, + DefValue); } void set_int_val(int msgpos, int *ip, char *DefValue) @@ -889,6 +886,8 @@ void edit_value(int curr) { Value = getenv(EnvNames[curr]); } + if (Value == NULL) + Value = ""; switch (curr) {