#include "common.h"
#include "plugin.h"
-#include "configfile.h"
#if HAVE_TERMIOS_H && HAVE_SYS_IOCTL_H && HAVE_MATH_H
# include <termios.h>
while (end_flag == 0)
{
ssize_t receive_buffer_length;
- ssize_t i;
/* check for timeout or input error*/
status = select (fd + 1, &input, NULL, NULL, &timeout);
* the beginning of the package has been found. */
escape_flag = 0;
- for (i = 0; i < receive_buffer_length; i++)
+ for (ssize_t i = 0; i < receive_buffer_length; i++)
{
/* Check if previous byte was the escape byte. */
if (escape_flag == 1)
double power;
double voltage;
int status;
- int i;
status = ted_open_device ();
if (status != 0)
power = NAN;
voltage = NAN;
- for (i = 0; i <= conf_retries; i++)
+ for (int i = 0; i <= conf_retries; i++)
{
status = ted_read_value (&power, &voltage);
if (status == 0)