remove some useless checks

The variable was already dereferenced above and thus can't be NULL
This commit is contained in:
Wim Taymans 2021-03-27 20:36:43 +01:00
parent e7ca1b474e
commit ae22852a9b
2 changed files with 2 additions and 2 deletions

View file

@ -574,7 +574,7 @@ static void profile_set_available(pa_card *impl, uint32_t index,
p->available = status;
if (emit && impl && impl->events && impl->events->profile_available)
if (emit && impl->events && impl->events->profile_available)
impl->events->profile_available(impl->user_data, index,
old, status);
}

View file

@ -1618,7 +1618,7 @@ static int json_to_pod(struct spa_pod_builder *b, uint32_t id,
spa_json_parse_string(value, len, val);
switch (info->parent) {
case SPA_TYPE_Id:
if ((ti = find_type_info(info ? info->values : info, val)) == NULL)
if ((ti = find_type_info(info->values, val)) == NULL)
return -EINVAL;
spa_pod_builder_id(b, ti->type);
break;