From 07adb14e3c4daa8b1e6ebc69e54128b38b014d30 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 26 Jan 2008 12:46:21 +0000 Subject: fixed -Wshadow warnings Signed-off-by: Eric Wong git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/directory.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/directory.c') 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) -- cgit v1.2.3