aboutsummaryrefslogtreecommitdiffstats
path: root/src/dirvec.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-26 21:28:16 +0100
committerMax Kellermann <max@duempel.org>2008-10-26 21:28:16 +0100
commit3dac99034afe14e61554f327329c11d32962ae04 (patch)
tree030c40b7dd624cbc88810e48cedb069e7c01123d /src/dirvec.c
parent5f2384001ecd02dbd49985e63faa2000ce9700df (diff)
downloadmpd-3dac99034afe14e61554f327329c11d32962ae04.tar.gz
mpd-3dac99034afe14e61554f327329c11d32962ae04.tar.xz
mpd-3dac99034afe14e61554f327329c11d32962ae04.zip
dirvec: fixed GCC shadow warning
On some systems, string.h declares basename(). This emits a shadow warning. Change the variable name.
Diffstat (limited to 'src/dirvec.c')
-rw-r--r--src/dirvec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dirvec.c b/src/dirvec.c
index b178f311a..a9e59ab68 100644
--- a/src/dirvec.c
+++ b/src/dirvec.c
@@ -30,21 +30,21 @@ void dirvec_sort(struct dirvec *dv)
struct directory *dirvec_find(const struct dirvec *dv, const char *path)
{
- char *basename;
+ char *base;
int i;
struct directory *ret = NULL;
- basename = g_path_get_basename(path);
+ base = g_path_get_basename(path);
pthread_mutex_lock(&nr_lock);
for (i = dv->nr; --i >= 0; )
- if (!strcmp(directory_get_name(dv->base[i]), basename)) {
+ if (!strcmp(directory_get_name(dv->base[i]), base)) {
ret = dv->base[i];
break;
}
pthread_mutex_unlock(&nr_lock);
- g_free(basename);
+ g_free(base);
return ret;
}