From 68a6482231f0e0d827e071568a785054d6c74dd0 Mon Sep 17 00:00:00 2001 From: Segwon Date: Tue, 19 Dec 2017 15:38:30 +0900 Subject: [PATCH] interface: add return type EINVAL in CHECK_ERROR Change-Id: I7dfb65fb371c428a7ef2f030cb5711bfb9d221af Signed-off-by: Segwon --- include/interface/peripheral_interface_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/interface/peripheral_interface_common.h b/include/interface/peripheral_interface_common.h index f51a4c2..d6137ce 100644 --- a/include/interface/peripheral_interface_common.h +++ b/include/interface/peripheral_interface_common.h @@ -32,6 +32,8 @@ if (expr) { \ if (errno == EAGAIN) \ return PERIPHERAL_ERROR_TRY_AGAIN; \ + if (errno == EINVAL) \ + return PERIPHERAL_ERROR_INVALID_PARAMETER; \ char errmsg[MAX_ERR_LEN]; \ strerror_r(errno, errmsg, sizeof(errmsg)); \ _E("Failed the %s(%d) function. errmsg: %s", __FUNCTION__, __LINE__, errmsg); \ -- 2.34.1