Avoid using devname as a variable name.

On FreeBSD, devname() is a system function, and was overshadowed.
This commit is contained in:
Diego Elio 'Flameeyes' Pettenò 2009-11-21 00:47:44 +01:00
parent d963998676
commit 62278b4b94

View file

@ -1032,27 +1032,27 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
if ((e = read_entry(u, name))) { if ((e = read_entry(u, name))) {
uint32_t idx; uint32_t idx;
char *devname; char *device_name;
uint32_t found_index = PA_INVALID_INDEX; uint32_t found_index = PA_INVALID_INDEX;
if ((devname = get_name(name, "sink:"))) { if ((device_name = get_name(name, "sink:"))) {
pa_sink* s; pa_sink* s;
PA_IDXSET_FOREACH(s, u->core->sinks, idx) { PA_IDXSET_FOREACH(s, u->core->sinks, idx) {
if (strcmp(s->name, devname) == 0) { if (strcmp(s->name, device_name) == 0) {
found_index = s->index; found_index = s->index;
break; break;
} }
} }
pa_xfree(devname); pa_xfree(device_name);
} else if ((devname = get_name(name, "source:"))) { } else if ((device_name = get_name(name, "source:"))) {
pa_source* s; pa_source* s;
PA_IDXSET_FOREACH(s, u->core->sources, idx) { PA_IDXSET_FOREACH(s, u->core->sources, idx) {
if (strcmp(s->name, devname) == 0) { if (strcmp(s->name, device_name) == 0) {
found_index = s->index; found_index = s->index;
break; break;
} }
} }
pa_xfree(devname); pa_xfree(device_name);
} }
pa_tagstruct_puts(reply, name); pa_tagstruct_puts(reply, name);