From 3127b45acf1af66b849cb83e02843b5efad18362 Mon Sep 17 00:00:00 2001 From: cekstam Date: Tue, 27 Mar 2018 15:08:08 +0200 Subject: [PATCH] Read CONTRIBUTING.md, but obviously got it wrong --- src/modbus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modbus.c b/src/modbus.c index 5b6fed21..64227741 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -397,13 +397,13 @@ static int mb_init_connection(mb_host_t *host) /* {{{ */ #define CAST_TO_VALUE_T(ds, vt, raw, scale, shift) \ do { \ if ((ds)->ds[0].type == DS_TYPE_COUNTER) \ - (vt).counter = (((counter_t)(raw) * scale) + shift); \ + (vt).counter = (((counter_t)(raw)*scale) + shift); \ else if ((ds)->ds[0].type == DS_TYPE_GAUGE) \ - (vt).gauge = (((gauge_t)(raw) * scale) + shift); \ + (vt).gauge = (((gauge_t)(raw)*scale) + shift); \ else if ((ds)->ds[0].type == DS_TYPE_DERIVE) \ - (vt).derive = (((derive_t)(raw) * scale) + shift); \ + (vt).derive = (((derive_t)(raw)*scale) + shift); \ else /* if (ds->ds[0].type == DS_TYPE_ABSOLUTE) */ \ - (vt).absolute = (((absolute_t)(raw) * scale) + shift); \ + (vt).absolute = (((absolute_t)(raw)*scale) + shift); \ } while (0) static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */ -- 2.11.0