From: Pavel Rochnyack Date: Thu, 24 May 2018 14:24:41 +0000 (+0700) Subject: modbus: polished code style X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f11cb153816269a7888b0b94627b806e9f5ce327;p=collectd.git modbus: polished code style --- diff --git a/src/modbus.c b/src/modbus.c index f41aabb7..40e0079e 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -80,8 +80,8 @@ enum mb_register_type_e /* {{{ */ REG_TYPE_UINT16, REG_TYPE_UINT32, REG_TYPE_UINT32_CDAB, - REG_TYPE_UINT64, REG_TYPE_INT64, + REG_TYPE_UINT64, REG_TYPE_FLOAT, REG_TYPE_FLOAT_CDAB }; /* }}} */ @@ -433,13 +433,13 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */ (data->register_type != REG_TYPE_INT32) && (data->register_type != REG_TYPE_INT32_CDAB) && (data->register_type != REG_TYPE_UINT32) && + (data->register_type != REG_TYPE_UINT32_CDAB) && (data->register_type != REG_TYPE_INT64) && - (data->register_type != REG_TYPE_UINT64) && - (data->register_type != REG_TYPE_UINT32_CDAB)) { + (data->register_type != REG_TYPE_UINT64)) { NOTICE( "Modbus plugin: The data source of type \"%s\" is %s, not gauge. " "This will most likely result in problems, because the register type " - "is not UINT32 OR UINT64.", + "is not UINT32 or UINT64.", data->type, DS_TYPE_TO_STRING(ds->ds[0].type)); } @@ -450,8 +450,8 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */ (data->register_type == REG_TYPE_FLOAT) || (data->register_type == REG_TYPE_FLOAT_CDAB)) values_num = 2; - else if ((data->register_type == REG_TYPE_UINT64) || - (data->register_type == REG_TYPE_INT64)) + else if ((data->register_type == REG_TYPE_INT64) || + (data->register_type == REG_TYPE_UINT64)) values_num = 4; else values_num = 1;