aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-09 21:19:00 +0200
committerMax Kellermann <max@duempel.org>2011-09-09 21:36:41 +0200
commit35af940166da22a253cf8bbff48d6e7d63389d0b (patch)
tree55a3c8f70aef121aebee9b631d6eda7ecb028e03 /src
parentbc0fec0afe8e541dd2d7df2ddbe04b13f6a93678 (diff)
downloadmpd-35af940166da22a253cf8bbff48d6e7d63389d0b.tar.gz
mpd-35af940166da22a253cf8bbff48d6e7d63389d0b.tar.xz
mpd-35af940166da22a253cf8bbff48d6e7d63389d0b.zip
conf: get_block_param() returns a const pointer
No caller needs to write.
Diffstat (limited to '')
-rw-r--r--src/conf.c8
-rw-r--r--src/conf.h2
-rw-r--r--src/output/shout_plugin.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/conf.c b/src/conf.c
index 47a3bae9c..4434a875d 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -559,7 +559,7 @@ config_get_positive(const char *name, unsigned default_value)
return (unsigned)value;
}
-struct block_param *
+const struct block_param *
config_get_block_param(const struct config_param * param, const char *name)
{
if (param == NULL)
@@ -597,7 +597,7 @@ const char *
config_get_block_string(const struct config_param *param, const char *name,
const char *default_value)
{
- struct block_param *bp = config_get_block_param(param, name);
+ const struct block_param *bp = config_get_block_param(param, name);
if (bp == NULL)
return default_value;
@@ -609,7 +609,7 @@ unsigned
config_get_block_unsigned(const struct config_param *param, const char *name,
unsigned default_value)
{
- struct block_param *bp = config_get_block_param(param, name);
+ const struct block_param *bp = config_get_block_param(param, name);
long value;
char *endptr;
@@ -630,7 +630,7 @@ bool
config_get_block_bool(const struct config_param *param, const char *name,
bool default_value)
{
- struct block_param *bp = config_get_block_param(param, name);
+ const struct block_param *bp = config_get_block_param(param, name);
bool success, value;
if (bp == NULL)
diff --git a/src/conf.h b/src/conf.h
index 89995d1c5..8aad9839f 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -177,7 +177,7 @@ unsigned
config_get_positive(const char *name, unsigned default_value);
G_GNUC_PURE
-struct block_param *
+const struct block_param *
config_get_block_param(const struct config_param *param, const char *name);
G_GNUC_PURE
diff --git a/src/output/shout_plugin.c b/src/output/shout_plugin.c
index 7a4d70e70..80adf1638 100644
--- a/src/output/shout_plugin.c
+++ b/src/output/shout_plugin.c
@@ -125,7 +125,7 @@ my_shout_init_driver(const struct audio_format *audio_format,
const char *user;
char *name;
const char *value;
- struct block_param *block_param;
+ const struct block_param *block_param;
int public;
if (audio_format == NULL ||