X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fmodbus.c;h=efcf6be8950d3b302227bac029288be746348780;hp=daa3c028f5711ef685982071192f5d0d7e4e831f;hb=d486225f89ea52d8ed2b4242eba2ad94c409f837;hpb=7ef225022164d12f4560d03789c9d418b442d4cf diff --git a/src/modbus.c b/src/modbus.c index daa3c028..efcf6be8 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -135,7 +135,7 @@ struct mb_host_s /* {{{ */ #else modbus_t *connection; #endif - _Bool is_connected; + bool is_connected; }; /* }}} */ typedef struct mb_host_s mb_host_t; @@ -152,7 +152,7 @@ struct mb_data_group_s /* {{{ */ /* * Global variables */ -static mb_data_t *data_definitions = NULL; +static mb_data_t *data_definitions; /* * Functions @@ -332,7 +332,7 @@ static int mb_init_connection(mb_host_t *host) /* {{{ */ return status; } - host->is_connected = 1; + host->is_connected = true; return 0; } /* }}} int mb_init_connection */ /* #endif LEGACY_LIBMODBUS */ @@ -465,7 +465,7 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */ if (status != 0) { ERROR("Modbus plugin: mb_init_connection (%s/%s) failed. ", host->host, host->node); - host->is_connected = 0; + host->is_connected = false; host->connection = NULL; return -1; }