From 90712dbef2f5dc4971c6857c3e8eadab1f8bdeb5 Mon Sep 17 00:00:00 2001 From: YoungJun Cho Date: Thu, 24 Nov 2016 14:20:18 +0900 Subject: [PATCH] tdm_backend: change _check_abi_version() return value This patch changes _check_abi_version() return value as 0 for success, -1 for failure. The caller only checks the result is less than 0 or not, so it is dead code. Change-Id: I194817bcd0fd928f0b66cdd0154c3669c95548f5 Signed-off-by: YoungJun Cho --- src/tdm_backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tdm_backend.c b/src/tdm_backend.c index c83b3da..acbde8e 100644 --- a/src/tdm_backend.c +++ b/src/tdm_backend.c @@ -53,14 +53,14 @@ _check_abi_version(tdm_backend_module *module, int abimaj, int abimin) int minor = TDM_BACKEND_GET_ABI_MINOR(module->abi_version); if (major < abimaj) goto failed; - if (major > abimaj) return 1; + if (major > abimaj) return 0; if (minor < abimin) goto failed; - return 1; + return 0; failed: TDM_ERR("The ABI version(%d.%d) of '%s' is less than %d.%d", major, minor, module->name ? module->name : "unknown", abimaj, abimin); - return 0; + return -1; } EXTERN tdm_error -- 2.7.4