diff options
author | Max Kellermann <max@duempel.org> | 2008-09-15 12:27:28 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-15 12:27:28 +0200 |
commit | 0b3bcb6c7f1bb4a633896b8a9936e498570ef8e1 (patch) | |
tree | 611b143eb0834c892246f8b31311e9224977c952 /src/colors.c | |
parent | 1f0ff952055c920c8671a1587c622e4df8b4a99d (diff) | |
download | mpd-0b3bcb6c7f1bb4a633896b8a9936e498570ef8e1.tar.gz mpd-0b3bcb6c7f1bb4a633896b8a9936e498570ef8e1.tar.xz mpd-0b3bcb6c7f1bb4a633896b8a9936e498570ef8e1.zip |
const pointers
Convert pointers to const whenever it is possible. Fixes all those
-Wconst warnings.
Diffstat (limited to 'src/colors.c')
-rw-r--r-- | src/colors.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/colors.c b/src/colors.c index c504e0085..e60399ea7 100644 --- a/src/colors.c +++ b/src/colors.c @@ -64,7 +64,7 @@ typedef struct { typedef struct { int id; - char *name; + const char *name; short fg; attr_t attrs; } color_entry_t; @@ -107,7 +107,7 @@ colors_lookup(int id) } static color_entry_t * -colors_lookup_by_name(char *name) +colors_lookup_by_name(const char *name) { int i; @@ -147,7 +147,7 @@ colors_update_pair(int id) } short -colors_str2color(char *str) +colors_str2color(const char *str) { if( !strcasecmp(str,"black") ) return COLOR_BLACK; @@ -191,7 +191,7 @@ colors_str2color(char *str) * it adds the definition to the color_definition_list and init_color() is * done in colors_start() */ int -colors_define(char *name, short r, short g, short b) +colors_define(const char *name, short r, short g, short b) { color_definition_entry_t *entry; short color = colors_str2color(name); @@ -212,7 +212,7 @@ colors_define(char *name, short r, short g, short b) int -colors_assign(char *name, char *value) +colors_assign(const char *name, const char *value) { color_entry_t *entry = colors_lookup_by_name(name); short color; |