aboutsummaryrefslogtreecommitdiffstats
path: root/src/conf.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-25 16:03:49 +0100
committerMax Kellermann <max@duempel.org>2009-01-25 16:03:49 +0100
commit5f7791009790dc40f2d76be310ffeab55c242ced (patch)
tree5e26d9d5f873a76fe61c6403a69ae123b0d57ad3 /src/conf.c
parent80799fa84eb4330083e4de20b87f97beea7d6ba7 (diff)
downloadmpd-5f7791009790dc40f2d76be310ffeab55c242ced.tar.gz
mpd-5f7791009790dc40f2d76be310ffeab55c242ced.tar.xz
mpd-5f7791009790dc40f2d76be310ffeab55c242ced.zip
conf: const pointers in block get functions
All config_get_block_*() functions should accept constant config_param pointers.
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/conf.c b/src/conf.c
index 74e1f5337..fbb348cf9 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -350,7 +350,7 @@ void config_read_file(const char *file)
}
struct config_param *
-config_get_next_param(const char *name, struct config_param * last)
+config_get_next_param(const char *name, const struct config_param * last)
{
struct config_entry *entry;
GSList *node;
@@ -381,7 +381,7 @@ config_get_next_param(const char *name, struct config_param * last)
const char *
config_get_string(const char *name, const char *default_value)
{
- struct config_param *param = config_get_param(name);
+ const struct config_param *param = config_get_param(name);
if (param == NULL)
return default_value;
@@ -410,7 +410,7 @@ config_get_path(const char *name)
unsigned
config_get_positive(const char *name, unsigned default_value)
{
- struct config_param *param = config_get_param(name);
+ const struct config_param *param = config_get_param(name);
long value;
char *endptr;
@@ -428,7 +428,7 @@ config_get_positive(const char *name, unsigned default_value)
}
struct block_param *
-getBlockParam(struct config_param * param, const char *name)
+getBlockParam(const struct config_param * param, const char *name)
{
struct block_param *ret = NULL;
int i;
@@ -449,7 +449,7 @@ getBlockParam(struct config_param * param, const char *name)
bool config_get_bool(const char *name, bool default_value)
{
- struct config_param *param = config_get_param(name);
+ const struct config_param *param = config_get_param(name);
int value;
if (param == NULL)
@@ -468,7 +468,7 @@ bool config_get_bool(const char *name, bool default_value)
}
const char *
-config_get_block_string(struct config_param *param, const char *name,
+config_get_block_string(const struct config_param *param, const char *name,
const char *default_value)
{
struct block_param *bp = getBlockParam(param, name);
@@ -480,7 +480,7 @@ config_get_block_string(struct config_param *param, const char *name,
}
unsigned
-config_get_block_unsigned(struct config_param *param, const char *name,
+config_get_block_unsigned(const struct config_param *param, const char *name,
unsigned default_value)
{
struct block_param *bp = getBlockParam(param, name);
@@ -501,7 +501,7 @@ config_get_block_unsigned(struct config_param *param, const char *name,
}
bool
-config_get_block_bool(struct config_param *param, const char *name,
+config_get_block_bool(const struct config_param *param, const char *name,
bool default_value)
{
struct block_param *bp = getBlockParam(param, name);