aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-22 16:12:34 +0100
committerMax Kellermann <max@duempel.org>2009-01-22 16:12:34 +0100
commit1e6a26b6cae1e9bd90d820c6ea4ec8be2da2da91 (patch)
treedeb75a9e6ea111728571f99357c69d05697531dc /src/locate.c
parentd47be76ce09ab3de9dfd5989ea65ca305c723f73 (diff)
downloadmpd-1e6a26b6cae1e9bd90d820c6ea4ec8be2da2da91.tar.gz
mpd-1e6a26b6cae1e9bd90d820c6ea4ec8be2da2da91.tar.xz
mpd-1e6a26b6cae1e9bd90d820c6ea4ec8be2da2da91.zip
locate: use const pointers
Pass const pointers where no writes are performed.
Diffstat (limited to 'src/locate.c')
-rw-r--r--src/locate.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/locate.c b/src/locate.c
index cd26dbd68..a7804ea49 100644
--- a/src/locate.c
+++ b/src/locate.c
@@ -127,7 +127,7 @@ void freeLocateTagItem(LocateTagItem * item)
}
static int
-strstrSearchTag(struct song *song, enum tag_type type, char *str)
+strstrSearchTag(const struct song *song, enum tag_type type, const char *str)
{
int i;
char *duplicate;
@@ -177,7 +177,8 @@ strstrSearchTag(struct song *song, enum tag_type type, char *str)
}
int
-strstrSearchTags(struct song *song, int numItems, LocateTagItem *items)
+strstrSearchTags(const struct song *song, int numItems,
+ const LocateTagItem *items)
{
int i;
@@ -192,7 +193,8 @@ strstrSearchTags(struct song *song, int numItems, LocateTagItem *items)
}
static int
-tagItemFoundAndMatches(struct song *song, enum tag_type type, char *str)
+tagItemFoundAndMatches(const struct song *song, enum tag_type type,
+ const char *str)
{
int i;
int8_t visitedTypes[TAG_NUM_OF_ITEM_TYPES] = { 0 };
@@ -237,8 +239,8 @@ tagItemFoundAndMatches(struct song *song, enum tag_type type, char *str)
int
-tagItemsFoundAndMatches(struct song *song, int numItems,
- LocateTagItem * items)
+tagItemsFoundAndMatches(const struct song *song, int numItems,
+ const LocateTagItem * items)
{
int i;