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:
Wim Taymans 2017-12-18 11:38:30 +01:00
parent e5e360d5df
commit 4d6ac37398
38 changed files with 308 additions and 297 deletions

View file

@ -27,13 +27,15 @@
static const struct spa_handle_factory *factories[MAX_FACTORIES];
static int n_factories;
void
spa_handle_factory_register(const struct spa_handle_factory *factory)
int spa_handle_factory_register(const struct spa_handle_factory *factory)
{
if (n_factories < MAX_FACTORIES)
factories[n_factories++] = factory;
else
else {
fprintf(stderr, "too many factories\n");
return -ENOMEM;
}
return 0;
}
int