From: Florian Forster Date: Thu, 18 Jun 2015 14:45:23 +0000 (+0200) Subject: modbus plugin: Make sure variable is initialized. X-Git-Tag: collectd-5.5.1~6^2~7 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=699ed6dd24817c046f47c2c5934d9af6343e4c65;p=collectd.git modbus plugin: Make sure variable is initialized. This was introduced by the merge (09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b). --- diff --git a/src/modbus.c b/src/modbus.c index 2cef4aa2..b5d1e251 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -377,7 +377,7 @@ static int mb_read_data (mb_host_t *host, mb_slave_t *slave, /* {{{ */ uint16_t values[2]; int values_num; const data_set_t *ds; - int status; + int status = 0; if ((host == NULL) || (slave == NULL) || (data == NULL)) return (EINVAL);