X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fmatch_timediff.c;h=172b31262480e3f4c092c2bafc2f67d93efbb42a;hp=f0a456b918368c1492e87721032d166cb8950c9b;hb=54619dc85fd308b21ed09a0271e5c7383c7921b9;hpb=57b9e83320b35d4dbd1312db5fbf33ddf8ecd989 diff --git a/src/match_timediff.c b/src/match_timediff.c index f0a456b9..172b3126 100644 --- a/src/match_timediff.c +++ b/src/match_timediff.c @@ -26,8 +26,8 @@ #include "collectd.h" -#include "common.h" #include "filter_chain.h" +#include "utils/common/common.h" #define SATISFY_ALL 0 #define SATISFY_ANY 1 @@ -53,7 +53,7 @@ static int mt_create(const oconfig_item_t *ci, void **user_data) /* {{{ */ m = calloc(1, sizeof(*m)); if (m == NULL) { ERROR("mt_create: calloc failed."); - return (-ENOMEM); + return -ENOMEM; } m->future = 0; @@ -91,11 +91,11 @@ static int mt_create(const oconfig_item_t *ci, void **user_data) /* {{{ */ if (status != 0) { free(m); - return (status); + return status; } *user_data = m; - return (0); + return 0; } /* }}} int mt_create */ static int mt_destroy(void **user_data) /* {{{ */ @@ -104,7 +104,7 @@ static int mt_destroy(void **user_data) /* {{{ */ sfree(*user_data); } - return (0); + return 0; } /* }}} int mt_destroy */ static int mt_match(const data_set_t __attribute__((unused)) * ds, /* {{{ */ @@ -115,22 +115,22 @@ static int mt_match(const data_set_t __attribute__((unused)) * ds, /* {{{ */ cdtime_t now; if ((user_data == NULL) || (*user_data == NULL)) - return (-1); + return -1; m = *user_data; now = cdtime(); if (m->future != 0) { if (vl->time >= (now + m->future)) - return (FC_MATCH_MATCHES); + return FC_MATCH_MATCHES; } if (m->past != 0) { if (vl->time <= (now - m->past)) - return (FC_MATCH_MATCHES); + return FC_MATCH_MATCHES; } - return (FC_MATCH_NO_MATCH); + return FC_MATCH_NO_MATCH; } /* }}} int mt_match */ void module_register(void) {