diff --git a/src/mbmon.c b/src/mbmon.c
index 2e26aa1fc0083a004e7fe47e65461fd1b5d5cf0a..9629b8960d67da5960f957d89f48bfd0c40f500c 100644 (file)
--- a/src/mbmon.c
+++ b/src/mbmon.c
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
-#include "configfile.h"
#include <netdb.h>
#include <netinet/in.h>
#include <netdb.h>
#include <netinet/in.h>
const char *host;
const char *port;
const char *host;
const char *port;
- struct addrinfo *ai_list, *ai_ptr;
+ struct addrinfo *ai_list;
int ai_return;
host = mbmon_host;
int ai_return;
host = mbmon_host;
}
fd = -1;
}
fd = -1;
- for (ai_ptr = ai_list; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next)
+ for (struct addrinfo *ai_ptr = ai_list; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next)
{
/* create our socket descriptor */
if ((fd = socket (ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol)) < 0)
{
/* create our socket descriptor */
if ((fd = socket (ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol)) < 0)
/* Trim trailing whitespace from a string. */
static void trim_spaces (char *s)
{
/* Trim trailing whitespace from a string. */
static void trim_spaces (char *s)
{
- size_t l;
-
- for (l = strlen (s) - 1; (l > 0) && isspace ((int) s[l]); l--)
+ for (size_t l = strlen (s) - 1; (l > 0) && isspace ((int) s[l]); l--)
s[l] = '\0';
}
s[l] = '\0';
}