modbus plugin: unsigned value can't be negative
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 24 Jul 2016 15:21:56 +0000 (17:21 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 24 Jul 2016 15:21:56 +0000 (17:21 +0200)
src/modbus.c

index 51447b1..11b9bf1 100644 (file)
@@ -257,7 +257,7 @@ static int mb_submit (mb_host_t *host, mb_slave_t *slave, /* {{{ */
   if ((host == NULL) || (slave == NULL) || (data == NULL))
     return (EINVAL);
 
-  if (host->interval <= 0)
+  if (host->interval == 0)
     host->interval = plugin_get_interval ();
 
   if (slave->instance[0] == 0)