#include <errno.h>
#include <math.h>
#include <pthread.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <endian.h>
#elif HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
+#else /* fallback */
+#include "collectd/stdendian.h"
#endif
#if HAVE_GCRYPT_H
lcc_network_parse_options_t const *opts);
#if HAVE_GCRYPT_H
-static int init_gcrypt() {
+static int init_gcrypt(void) {
/* http://lists.gnupg.org/pipermail/gcrypt-devel/2003-August/000458.html
* Because you can't know in a library whether another library has
* already initialized the library */
static double ntohd(double val) /* {{{ */
{
- static int config = 0;
+ static int config;
union {
uint8_t byte[8];
return EINVAL;
state->values_len = (size_t)n;
- state->values = calloc(sizeof(*state->values), state->values_len);
- state->values_types = calloc(sizeof(*state->values_types), state->values_len);
+ state->values = calloc(state->values_len, sizeof(*state->values));
+ state->values_types = calloc(state->values_len, sizeof(*state->values_types));
if ((state->values == NULL) || (state->values_types == NULL)) {
return ENOMEM;
}