From 0b3bcb6c7f1bb4a633896b8a9936e498570ef8e1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 15 Sep 2008 12:27:28 +0200 Subject: const pointers Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings. --- src/mpdclient.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mpdclient.c') 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; -- cgit v1.2.3