aboutsummaryrefslogtreecommitdiffstats
path: root/src/conf.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-17 20:23:58 +0100
committerMax Kellermann <max@duempel.org>2009-01-17 20:23:58 +0100
commit0b29a22c088462f2d2c0fba8363423bd2ab41f1a (patch)
tree136eb8698c082242e896a71bfaa33e5138e026a6 /src/conf.c
parent7acc62366cb59aba414821563cc89e01e96c1987 (diff)
downloadmpd-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.c7
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;
}