diff options
author | Max Kellermann <max@duempel.org> | 2009-01-17 20:23:58 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-17 20:23:58 +0100 |
commit | 0b29a22c088462f2d2c0fba8363423bd2ab41f1a (patch) | |
tree | 136eb8698c082242e896a71bfaa33e5138e026a6 /src/conf.c | |
parent | 7acc62366cb59aba414821563cc89e01e96c1987 (diff) | |
download | mpd-0b29a22c088462f2d2c0fba8363423bd2ab41f1a.tar.gz mpd-0b29a22c088462f2d2c0fba8363423bd2ab41f1a.tar.xz mpd-0b29a22c088462f2d2c0fba8363423bd2ab41f1a.zip |
conf: replaced getConfigParamValue() with config_get_string()
Don't return a writable pointer.
Diffstat (limited to 'src/conf.c')
-rw-r--r-- | src/conf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/conf.c b/src/conf.c index f8ee5519a..f71ace7f2 100644 --- a/src/conf.c +++ b/src/conf.c @@ -376,12 +376,13 @@ config_get_next_param(const char *name, struct config_param * last) return param; } -char *getConfigParamValue(const char *name) +const char * +config_get_string(const char *name, const char *default_value) { struct config_param *param = config_get_param(name); - if (!param) - return NULL; + if (param == NULL) + return default_value; return param->value; } |