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
This commit is contained in:
committed by
Eric Wong
parent
28008e6977
commit
07adb14e3c
+8
-8
@@ -95,7 +95,7 @@ static int prepOssMixer(char *device)
|
||||
|
||||
if (param) {
|
||||
char *labels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS;
|
||||
char *dup;
|
||||
char *duplicated;
|
||||
int i, j;
|
||||
int devmask = 0;
|
||||
|
||||
@@ -106,16 +106,16 @@ static int prepOssMixer(char *device)
|
||||
}
|
||||
|
||||
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
|
||||
dup = xstrdup(labels[i]);
|
||||
duplicated = xstrdup(labels[i]);
|
||||
/* eliminate spaces at the end */
|
||||
j = strlen(dup) - 1;
|
||||
while (j >= 0 && dup[j] == ' ')
|
||||
dup[j--] = '\0';
|
||||
if (strcasecmp(dup, param->value) == 0) {
|
||||
free(dup);
|
||||
j = strlen(duplicated) - 1;
|
||||
while (j >= 0 && duplicated[j] == ' ')
|
||||
duplicated[j--] = '\0';
|
||||
if (strcasecmp(duplicated, param->value) == 0) {
|
||||
free(duplicated);
|
||||
break;
|
||||
}
|
||||
free(dup);
|
||||
free(duplicated);
|
||||
}
|
||||
|
||||
if (i >= SOUND_MIXER_NRDEVICES) {
|
||||
|
||||
Reference in New Issue
Block a user