aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbUtils.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-06 15:28:31 +0200
committerMax Kellermann <max@duempel.org>2008-09-06 15:28:31 +0200
commit35c0b84f0897508b1f2fb82d1fc096164621b2bb (patch)
treec9a129da91fca3808adb586de8eecf392defb486 /src/dbUtils.c
parentd38d2bc3533dcfb661a3cbb8bd6cd9574c31ab69 (diff)
downloadmpd-35c0b84f0897508b1f2fb82d1fc096164621b2bb.tar.gz
mpd-35c0b84f0897508b1f2fb82d1fc096164621b2bb.tar.xz
mpd-35c0b84f0897508b1f2fb82d1fc096164621b2bb.zip
dbUtils, playlist, directory: pass constant pointers
The usual bunch of const pointer conversions.
Diffstat (limited to 'src/dbUtils.c')
-rw-r--r--src/dbUtils.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index 1c758476d..26e727377 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -80,7 +80,8 @@ static int searchInDirectory(int fd, Song * song, void *data)
return 0;
}
-int searchForSongsIn(int fd, char *name, int numItems, LocateTagItem * items)
+int searchForSongsIn(int fd, const char *name, int numItems,
+ LocateTagItem * items)
{
int ret;
int i;
@@ -118,7 +119,7 @@ static int findInDirectory(int fd, Song * song, void *data)
return 0;
}
-int findSongsIn(int fd, char *name, int numItems, LocateTagItem * items)
+int findSongsIn(int fd, const char *name, int numItems, LocateTagItem * items)
{
LocateTagItemArray array;
@@ -148,7 +149,7 @@ static int searchStatsInDirectory(mpd_unused int fd, Song * song, void *data)
return 0;
}
-int searchStatsForSongsIn(int fd, char *name, int numItems,
+int searchStatsForSongsIn(int fd, const char *name, int numItems,
LocateTagItem * items)
{
SearchStats stats;
@@ -166,7 +167,7 @@ int searchStatsForSongsIn(int fd, char *name, int numItems,
return ret;
}
-int printAllIn(int fd, char *name)
+int printAllIn(int fd, const char *name)
{
return traverseAllIn(fd, name, printSongInDirectory,
printDirectoryInDirectory, NULL);
@@ -185,12 +186,12 @@ static int directoryAddSongToStoredPlaylist(int fd, Song *song, void *data)
return 0;
}
-int addAllIn(int fd, char *name)
+int addAllIn(int fd, const char *name)
{
return traverseAllIn(fd, name, directoryAddSongToPlaylist, NULL, NULL);
}
-int addAllInToStoredPlaylist(int fd, char *name, char *utf8file)
+int addAllInToStoredPlaylist(int fd, const char *name, const char *utf8file)
{
return traverseAllIn(fd, name, directoryAddSongToStoredPlaylist, NULL,
(void *)utf8file);
@@ -211,13 +212,13 @@ static int sumSongTime(mpd_unused int fd, Song * song, void *data)
return 0;
}
-int printInfoForAllIn(int fd, char *name)
+int printInfoForAllIn(int fd, const char *name)
{
return traverseAllIn(fd, name, directoryPrintSongInfo,
printDirectoryInDirectory, NULL);
}
-int countSongsIn(int fd, char *name)
+int countSongsIn(int fd, const char *name)
{
int count = 0;
void *ptr = (void *)&count;
@@ -227,7 +228,7 @@ int countSongsIn(int fd, char *name)
return count;
}
-unsigned long sumSongTimesIn(int fd, char *name)
+unsigned long sumSongTimesIn(int fd, const char *name)
{
unsigned long dbPlayTime = 0;
void *ptr = (void *)&dbPlayTime;