From 44f319173566f01e56355c0031a75f6609b95b57 Mon Sep 17 00:00:00 2001 From: Valerio De Benedetto Date: Thu, 1 Jun 2023 18:29:23 +0200 Subject: [PATCH] Minor fixes --- nanomodbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nanomodbus.c b/nanomodbus.c index 2e94003..d63405e 100644 --- a/nanomodbus.c +++ b/nanomodbus.c @@ -102,7 +102,7 @@ static void msg_state_req(nmbs_t* nmbs, uint8_t fc) { #endif -int nmbs_create(nmbs_t* nmbs, const nmbs_platform_conf* platform_conf) { +nmbs_error nmbs_create(nmbs_t* nmbs, const nmbs_platform_conf* platform_conf) { if (!nmbs) return NMBS_ERROR_INVALID_ARGUMENT; @@ -386,7 +386,7 @@ static nmbs_error recv_res_header(nmbs_t* nmbs) { NMBS_DEBUG_PRINT("%d NMBS res <- address_rtu %d\texception %d\n", nmbs->address_rtu, nmbs->msg.unit_id, exception); - return exception; + return (nmbs_error) exception; } return NMBS_ERROR_INVALID_RESPONSE;