#include "collectd.h"
-#include "common.h"
#include "plugin.h"
+#include "utils/common/common.h"
#include "utils_cache.h"
#include "utils_complain.h"
#include "utils_fbhash.h"
#if COLLECT_DEBUG
char name[6 * DATA_MAX_NAME_LEN];
FORMAT_VL(name, sizeof(name), vl);
- name[sizeof(name) - 1] = 0;
+ name[sizeof(name) - 1] = '\0';
DEBUG("network plugin: network_dispatch_values: "
"NOT dispatching %s.",
name);
#else
int loop = 0;
#endif
- int yes = 1;
/* allow multiple sockets to use the same PORT number */
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1) {
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &(int){1}, sizeof(int)) == -1) {
ERROR("network plugin: setsockopt (reuseaddr): %s", STRERRNO);
return -1;
}
#if COLLECT_DEBUG
char name[6 * DATA_MAX_NAME_LEN];
FORMAT_VL(name, sizeof(name), vl);
- name[sizeof(name) - 1] = 0;
+ name[sizeof(name) - 1] = '\0';
DEBUG("network plugin: network_write: "
"NOT sending %s.",
name);