aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-01-26 12:46:21 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-26 12:46:21 +0000
commit07adb14e3c4daa8b1e6ebc69e54128b38b014d30 (patch)
tree7d22b4b2eb31a9bf46cf648731fe1370005ab1c9 /src/directory.c
parent28008e697720bb2b11989bb887eb468b91409b1a (diff)
downloadmpd-07adb14e3c4daa8b1e6ebc69e54128b38b014d30.tar.gz
mpd-07adb14e3c4daa8b1e6ebc69e54128b38b014d30.tar.xz
mpd-07adb14e3c4daa8b1e6ebc69e54128b38b014d30.zip
fixed -Wshadow warnings
Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/directory.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/directory.c b/src/directory.c
index 971a156ce..53b864018 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -761,21 +761,21 @@ void closeMp3Directory(void)
static Directory *findSubDirectory(Directory * directory, char *name)
{
void *subDirectory;
- char *dup = xstrdup(name);
+ char *duplicated = xstrdup(name);
char *key;
- key = strtok(dup, "/");
+ key = strtok(duplicated, "/");
if (!key) {
- free(dup);
+ free(duplicated);
return NULL;
}
if (findInList(directory->subDirectories, key, &subDirectory)) {
- free(dup);
+ free(duplicated);
return (Directory *) subDirectory;
}
- free(dup);
+ free(duplicated);
return NULL;
}
@@ -1264,9 +1264,9 @@ static Song *getSongDetails(char *file, char **shortnameRet,
void *song = NULL;
Directory *directory;
char *dir = NULL;
- char *dup = xstrdup(file);
- char *shortname = dup;
- char *c = strtok(dup, "/");
+ char *duplicated = xstrdup(file);
+ char *shortname = duplicated;
+ char *c = strtok(duplicated, "/");
DEBUG("get song: %s\n", file);
@@ -1275,25 +1275,25 @@ static Song *getSongDetails(char *file, char **shortnameRet,
c = strtok(NULL, "/");
}
- if (shortname != dup) {
- for (c = dup; c < shortname - 1; c++) {
+ if (shortname != duplicated) {
+ for (c = duplicated; c < shortname - 1; c++) {
if (*c == '\0')
*c = '/';
}
- dir = dup;
+ dir = duplicated;
}
if (!(directory = getDirectory(dir))) {
- free(dup);
+ free(duplicated);
return NULL;
}
if (!findInList(directory->songs, shortname, &song)) {
- free(dup);
+ free(duplicated);
return NULL;
}
- free(dup);
+ free(duplicated);
if (shortnameRet)
*shortnameRet = shortname;
if (directoryRet)