From 29cdbe709db6af42775c1abc3499a80ad73159d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Mon, 16 Oct 2017 21:24:07 +0200 Subject: [PATCH] afb-api-dyn: Uniform return 0 on success MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I6ca079fa84547928f999e07d1925202a1e14850f Signed-off-by: José Bollo --- bindings/samples/ave.c | 2 ++ src/afb-api-dyn.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bindings/samples/ave.c b/bindings/samples/ave.c index 6c3bf92c..a4b4144d 100644 --- a/bindings/samples/ave.c +++ b/bindings/samples/ave.c @@ -484,6 +484,8 @@ int afbBindingVdyn(afb_dynapi *dynapi) for (i = 0; apis[i] ; i++) { rc = afb_dynapi_new_api(dynapi, apis[i], NULL, build_api, (void*)apis[i]); + if (rc < 0) + AFB_DYNAPI_ERROR(dynapi, "can't create API %s", apis[i]); } return 0; } diff --git a/src/afb-api-dyn.c b/src/afb-api-dyn.c index 571f7fac..0667f519 100644 --- a/src/afb-api-dyn.c +++ b/src/afb-api-dyn.c @@ -274,7 +274,7 @@ int afb_api_dyn_add(struct afb_apiset *apiset, const char *name, const char *inf goto error; } INFO("binding %s added to set %s", afb_export_apiname(dynapi->export), afb_apiset_name(apiset)); - return 1; + return 0; error: afb_export_destroy(export); -- 2.16.6