aboutsummaryrefslogtreecommitdiffstats
path: root/src/mpdclient.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-15 12:27:28 +0200
committerMax Kellermann <max@duempel.org>2008-09-15 12:27:28 +0200
commit0b3bcb6c7f1bb4a633896b8a9936e498570ef8e1 (patch)
tree611b143eb0834c892246f8b31311e9224977c952 /src/mpdclient.c
parent1f0ff952055c920c8671a1587c622e4df8b4a99d (diff)
downloadmpd-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/mpdclient.c')
-rw-r--r--src/mpdclient.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 9f060c46d..941c09114 100644
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
@@ -51,12 +51,12 @@ static gint
compare_filelistentry_dir(gconstpointer filelist_entry1,
gconstpointer filelist_entry2)
{
- mpd_InfoEntity *e1, *e2;
+ const mpd_InfoEntity *e1, *e2;
char *key1, *key2;
int n = 0;
- e1 = ((filelist_entry_t *)filelist_entry1)->entity;
- e2 = ((filelist_entry_t *)filelist_entry2)->entity;
+ e1 = ((const filelist_entry_t *)filelist_entry1)->entity;
+ e2 = ((const filelist_entry_t *)filelist_entry2)->entity;
if (e1 && e2 &&
e1->type == MPD_INFO_ENTITY_TYPE_DIRECTORY &&
@@ -76,12 +76,12 @@ gint
compare_filelistentry_format(gconstpointer filelist_entry1,
gconstpointer filelist_entry2)
{
- mpd_InfoEntity *e1, *e2;
+ const mpd_InfoEntity *e1, *e2;
char key1[BUFSIZE], key2[BUFSIZE];
int n = 0;
- e1 = ((filelist_entry_t *)filelist_entry1)->entity;
- e2 = ((filelist_entry_t *)filelist_entry2)->entity;
+ e1 = ((const filelist_entry_t *)filelist_entry1)->entity;
+ e2 = ((const filelist_entry_t *)filelist_entry2)->entity;
if (e1 && e2 &&
e1->type == MPD_INFO_ENTITY_TYPE_SONG &&
@@ -884,7 +884,7 @@ mpdclient_filelist_free(mpdclient_filelist_t *filelist)
mpdclient_filelist_t *
-mpdclient_filelist_get(mpdclient_t *c, gchar *path)
+mpdclient_filelist_get(mpdclient_t *c, const gchar *path)
{
mpdclient_filelist_t *filelist;
mpd_InfoEntity *entity;