projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
virt plugin: Added support for new shutdown event details
[collectd.git]
/
src
/
match_timediff.c
diff --git
a/src/match_timediff.c
b/src/match_timediff.c
index
f0a456b
..
172b312
100644
(file)
--- a/
src/match_timediff.c
+++ b/
src/match_timediff.c
@@
-26,8
+26,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "filter_chain.h"
#include "filter_chain.h"
+#include "utils/common/common.h"
#define SATISFY_ALL 0
#define SATISFY_ANY 1
#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.");
m = calloc(1, sizeof(*m));
if (m == NULL) {
ERROR("mt_create: calloc failed.");
- return
(-ENOMEM)
;
+ return
-ENOMEM
;
}
m->future = 0;
}
m->future = 0;
@@
-91,11
+91,11
@@
static int mt_create(const oconfig_item_t *ci, void **user_data) /* {{{ */
if (status != 0) {
free(m);
if (status != 0) {
free(m);
- return
(status)
;
+ return
status
;
}
*user_data = m;
}
*user_data = m;
- return
(0)
;
+ return
0
;
} /* }}} int mt_create */
static int mt_destroy(void **user_data) /* {{{ */
} /* }}} int mt_create */
static int mt_destroy(void **user_data) /* {{{ */
@@
-104,7
+104,7
@@
static int mt_destroy(void **user_data) /* {{{ */
sfree(*user_data);
}
sfree(*user_data);
}
- return
(0)
;
+ return
0
;
} /* }}} int mt_destroy */
static int mt_match(const data_set_t __attribute__((unused)) * ds, /* {{{ */
} /* }}} 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))
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))
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))
}
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) {
} /* }}} int mt_match */
void module_register(void) {