mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
avoid shadowing arguments
This commit is contained in:
parent
91f4e4d3c8
commit
d88e8edd11
9 changed files with 37 additions and 37 deletions
|
|
@ -634,28 +634,28 @@ static int impl_set_param(void *object,
|
|||
switch (id) {
|
||||
case SPA_PARAM_Profile:
|
||||
{
|
||||
uint32_t id;
|
||||
uint32_t idx;
|
||||
bool save = false;
|
||||
|
||||
if (param == NULL) {
|
||||
id = acp_card_find_best_profile_index(this->card, NULL);
|
||||
idx = acp_card_find_best_profile_index(this->card, NULL);
|
||||
save = true;
|
||||
} else if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamProfile, NULL,
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&id),
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&idx),
|
||||
SPA_PARAM_PROFILE_save, SPA_POD_OPT_Bool(&save))) < 0) {
|
||||
spa_log_warn(this->log, "can't parse profile");
|
||||
spa_debug_pod(0, NULL, param);
|
||||
return res;
|
||||
}
|
||||
|
||||
acp_card_set_profile(this->card, id, save ? ACP_PROFILE_SAVE : 0);
|
||||
acp_card_set_profile(this->card, idx, save ? ACP_PROFILE_SAVE : 0);
|
||||
emit_info(this, false);
|
||||
break;
|
||||
}
|
||||
case SPA_PARAM_Route:
|
||||
{
|
||||
uint32_t id, device;
|
||||
uint32_t idx, device;
|
||||
struct spa_pod *props = NULL;
|
||||
struct acp_device *dev;
|
||||
bool save = false;
|
||||
|
|
@ -665,7 +665,7 @@ static int impl_set_param(void *object,
|
|||
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamRoute, NULL,
|
||||
SPA_PARAM_ROUTE_index, SPA_POD_Int(&id),
|
||||
SPA_PARAM_ROUTE_index, SPA_POD_Int(&idx),
|
||||
SPA_PARAM_ROUTE_device, SPA_POD_Int(&device),
|
||||
SPA_PARAM_ROUTE_props, SPA_POD_OPT_Pod(&props),
|
||||
SPA_PARAM_ROUTE_save, SPA_POD_OPT_Bool(&save))) < 0) {
|
||||
|
|
@ -677,7 +677,7 @@ static int impl_set_param(void *object,
|
|||
return -EINVAL;
|
||||
|
||||
dev = this->card->devices[device];
|
||||
acp_device_set_port(dev, id, save ? ACP_PORT_SAVE : 0);
|
||||
acp_device_set_port(dev, idx, save ? ACP_PORT_SAVE : 0);
|
||||
if (props)
|
||||
apply_device_props(this, dev, props);
|
||||
emit_info(this, false);
|
||||
|
|
|
|||
|
|
@ -457,17 +457,17 @@ static int impl_set_param(void *object,
|
|||
switch (id) {
|
||||
case SPA_PARAM_Profile:
|
||||
{
|
||||
uint32_t id;
|
||||
uint32_t idx;
|
||||
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamProfile, NULL,
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&id))) < 0) {
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&idx))) < 0) {
|
||||
spa_log_warn(this->log, "can't parse profile");
|
||||
spa_debug_pod(0, NULL, param);
|
||||
return res;
|
||||
}
|
||||
|
||||
set_profile(this, id);
|
||||
set_profile(this, idx);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -2693,11 +2693,11 @@ static DBusHandlerResult endpoint_set_configuration(DBusConnection *conn,
|
|||
is_new = transport == NULL;
|
||||
|
||||
if (is_new) {
|
||||
char *path = strdup(transport_path);
|
||||
char *tpath = strdup(transport_path);
|
||||
|
||||
transport = spa_bt_transport_create(monitor, path, 0);
|
||||
transport = spa_bt_transport_create(monitor, tpath, 0);
|
||||
if (transport == NULL) {
|
||||
free(path);
|
||||
free(tpath);
|
||||
return DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1713,7 +1713,7 @@ static int impl_set_param(void *object,
|
|||
switch (id) {
|
||||
case SPA_PARAM_Profile:
|
||||
{
|
||||
uint32_t id, next;
|
||||
uint32_t idx, next;
|
||||
uint32_t profile;
|
||||
enum spa_bluetooth_audio_codec codec;
|
||||
|
||||
|
|
@ -1722,13 +1722,13 @@ static int impl_set_param(void *object,
|
|||
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamProfile, NULL,
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&id))) < 0) {
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&idx))) < 0) {
|
||||
spa_log_warn(this->log, "can't parse profile");
|
||||
spa_debug_pod(0, NULL, param);
|
||||
return res;
|
||||
}
|
||||
|
||||
profile = get_profile_from_index(this, id, &next, &codec);
|
||||
profile = get_profile_from_index(this, idx, &next, &codec);
|
||||
if (profile == SPA_ID_INVALID)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
@ -1737,7 +1737,7 @@ static int impl_set_param(void *object,
|
|||
}
|
||||
case SPA_PARAM_Route:
|
||||
{
|
||||
uint32_t id, device;
|
||||
uint32_t idx, device;
|
||||
struct spa_pod *props = NULL;
|
||||
struct node *node;
|
||||
bool save = false;
|
||||
|
|
@ -1747,7 +1747,7 @@ static int impl_set_param(void *object,
|
|||
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamRoute, NULL,
|
||||
SPA_PARAM_ROUTE_index, SPA_POD_Int(&id),
|
||||
SPA_PARAM_ROUTE_index, SPA_POD_Int(&idx),
|
||||
SPA_PARAM_ROUTE_device, SPA_POD_Int(&device),
|
||||
SPA_PARAM_ROUTE_props, SPA_POD_OPT_Pod(&props),
|
||||
SPA_PARAM_ROUTE_save, SPA_POD_OPT_Bool(&save))) < 0) {
|
||||
|
|
|
|||
|
|
@ -331,16 +331,16 @@ static int impl_set_param(void *object,
|
|||
switch (id) {
|
||||
case SPA_PARAM_Profile:
|
||||
{
|
||||
uint32_t id;
|
||||
uint32_t idx;
|
||||
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamProfile, NULL,
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&id))) < 0) {
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&idx))) < 0) {
|
||||
spa_log_warn(this->log, "can't parse profile");
|
||||
spa_debug_pod(0, NULL, param);
|
||||
return res;
|
||||
}
|
||||
activate_profile(this, id);
|
||||
activate_profile(this, idx);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue