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"; desc = "On";
break; break;
default: default:
errno = -EINVAL; errno = EINVAL;
return NULL; return NULL;
} }

View file

@ -743,7 +743,7 @@ static struct spa_pod *build_profile(struct impl *this, struct spa_pod_builder *
break; break;
} }
default: default:
errno = -EINVAL; errno = EINVAL;
return NULL; 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); snprintf(name, sizeof(name), "%s-output", name_prefix);
break; break;
default: default:
errno = -EINVAL; errno = EINVAL;
return NULL; return NULL;
} }

View file

@ -244,7 +244,7 @@ static struct spa_pod *build_profile(struct impl *this, struct spa_pod_builder *
desc = "On"; desc = "On";
break; break;
default: default:
errno = -EINVAL; errno = EINVAL;
return NULL; 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); info = find_module_info(name);
if (info == NULL) { if (info == NULL) {
errno = -ENOENT; errno = ENOENT;
return NULL; return NULL;
} }
module = info->create(impl, args); module = info->create(impl, args);