/**
* collectd - src/mbmon.c
- * Copyright (C) 2006 Flavio Stanchina
+ * Copyright (C) 2006 Flavio Stanchina
+ * Copyright (C) 2006-2007 Florian octo Forster
* Based on the hddtemp plugin.
*
* This program is free software; you can redistribute it and/or modify it
*
* Authors:
* Flavio Stanchina <flavio at stanchina.net>
+ * Florian Forster <octo at collectd.org>
**/
#include "collectd.h"
#include "configfile.h"
#include <netdb.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
const char *host;
const char *port;
- struct addrinfo ai_hints;
+ struct addrinfo ai_hints = { 0 };
struct addrinfo *ai_list, *ai_ptr;
int ai_return;
- memset (&ai_hints, '\0', sizeof (ai_hints));
- ai_hints.ai_flags = 0;
#ifdef AI_ADDRCONFIG
ai_hints.ai_flags |= AI_ADDRCONFIG;
#endif
double value;
char *nextc;
- char *type;
- char *inst;
+ const char *type;
+ const char *inst;
*t++ = '\0';
trim_spaces (s);