*: Avoid macros that use casts where possible

Use direct field access when the type is known, instead of a macro that
includes a cast.

These were missed in e4fcbef89a.
This commit is contained in:
Demi Marie Obenour 2025-06-07 15:21:37 -04:00 committed by Wim Taymans
parent 5cf84fa3fe
commit b3bf5be1f6
11 changed files with 19 additions and 20 deletions

View file

@ -646,10 +646,11 @@ struct spa_pod * pw_protocol_native0_pod_from_v2(struct pw_impl_client *client,
if (pod == NULL)
return NULL;
if ((res = remap_from_v2(SPA_POD_TYPE(pod),
SPA_POD_BODY(pod),
SPA_POD_BODY_SIZE(pod),
client, &b)) < 0) {
if ((res = remap_from_v2(pod->type,
SPA_POD_BODY(pod),
pod->size,
client,
&b)) < 0) {
errno = -res;
return NULL;
}
@ -669,9 +670,9 @@ int pw_protocol_native0_pod_to_v2(struct pw_impl_client *client, const struct sp
}
if ((res = remap_to_v2(client, pw_type_info(),
SPA_POD_TYPE(pod),
pod->type,
SPA_POD_BODY(pod),
SPA_POD_BODY_SIZE(pod),
pod->size,
b)) < 0) {
return -res;
}

View file

@ -524,8 +524,8 @@ uint32_t collect_transport_codec_info(struct pw_manager_object *card,
if (iid != SPA_PROP_bluetoothAudioCodec)
continue;
if (SPA_POD_CHOICE_TYPE(type) != SPA_CHOICE_Enum ||
SPA_POD_TYPE(SPA_POD_CHOICE_CHILD(type)) != SPA_TYPE_Int)
if (type->body.type != SPA_CHOICE_Enum ||
type->body.child.type != SPA_TYPE_Int)
continue;
/*