mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-28 08:57:33 -05:00
Use int instead of bool as result
Prefer to use an int return from a function instead of bool because it can contain more info about failures.
This commit is contained in:
parent
e5e360d5df
commit
4d6ac37398
38 changed files with 308 additions and 297 deletions
|
|
@ -148,7 +148,7 @@ static const struct pw_module_events module_events = {
|
|||
.destroy = module_destroy,
|
||||
};
|
||||
|
||||
static bool module_init(struct pw_module *module, struct pw_properties *properties)
|
||||
static int module_init(struct pw_module *module, struct pw_properties *properties)
|
||||
{
|
||||
struct pw_core *core = pw_module_get_core(module);
|
||||
struct pw_type *t = pw_core_get_type(core);
|
||||
|
|
@ -162,7 +162,7 @@ static bool module_init(struct pw_module *module, struct pw_properties *properti
|
|||
NULL,
|
||||
sizeof(*data));
|
||||
if (factory == NULL)
|
||||
return false;
|
||||
return -ENOMEM;
|
||||
|
||||
data = pw_factory_get_user_data(factory);
|
||||
data->this = factory;
|
||||
|
|
@ -178,19 +178,10 @@ static bool module_init(struct pw_module *module, struct pw_properties *properti
|
|||
|
||||
pw_factory_register(factory, NULL, pw_module_get_global(module));
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void module_destroy(struct impl *impl)
|
||||
{
|
||||
pw_log_debug("module %p: destroy", impl);
|
||||
|
||||
free(impl);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool pipewire__module_init(struct pw_module *module, const char *args)
|
||||
int pipewire__module_init(struct pw_module *module, const char *args)
|
||||
{
|
||||
return module_init(module, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue