pipewire-pulse: set correct errno values

errno should be set to the positive errno value.

This does not cause problems except for the pulse-server where the
errno value is negated and returned as an error result.
This commit is contained in:
Wim Taymans 2021-03-19 12:46:05 +01:00
parent db85339f50
commit 8a4d2ed7ce
4 changed files with 5 additions and 5 deletions

View file

@ -355,7 +355,7 @@ static struct spa_pod *build_profile(struct impl *this, struct spa_pod_builder *
desc = "On";
break;
default:
errno = -EINVAL;
errno = EINVAL;
return NULL;
}

View file

@ -743,7 +743,7 @@ static struct spa_pod *build_profile(struct impl *this, struct spa_pod_builder *
break;
}
default:
errno = -EINVAL;
errno = EINVAL;
return NULL;
}
@ -858,7 +858,7 @@ static struct spa_pod *build_route(struct impl *this, struct spa_pod_builder *b,
snprintf(name, sizeof(name), "%s-output", name_prefix);
break;
default:
errno = -EINVAL;
errno = EINVAL;
return NULL;
}

View file

@ -244,7 +244,7 @@ static struct spa_pod *build_profile(struct impl *this, struct spa_pod_builder *
desc = "On";
break;
default:
errno = -EINVAL;
errno = EINVAL;
return NULL;
}

View file

@ -176,7 +176,7 @@ static struct module *create_module(struct client *client, const char *name, con
info = find_module_info(name);
if (info == NULL) {
errno = -ENOENT;
errno = ENOENT;
return NULL;
}
module = info->create(impl, args);