mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
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:
parent
db85339f50
commit
8a4d2ed7ce
4 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue