#include "snapshot.h"
#include "lttng-sessiond.h"
-int ht_cleanup_pipe[2] = { -1, -1 };
+int the_ht_cleanup_pipe[2] = {-1, -1};
/*
* Write to writable pipe used to notify a thread.
void ht_cleanup_push(struct lttng_ht *ht)
{
ssize_t ret;
- int fd = ht_cleanup_pipe[1];
+ int fd = the_ht_cleanup_pipe[1];
if (!ht) {
return;
/* All good. Don't send back the write positive ret value. */
ret = 0;
error:
- assert(!ret);
+ LTTNG_ASSERT(!ret);
}
int loglevels_match(int a_loglevel_type, int a_loglevel_value,
output->dst.session_root_path :
output->dst.net.base_dir;
}
-
-/*
- * Allocate a filter and copy the given original filter.
- *
- * Return allocated filter or NULL on error.
- */
-struct lttng_filter_bytecode *lttng_filter_bytecode_copy(
- const struct lttng_filter_bytecode *orig_f)
-{
- struct lttng_filter_bytecode *filter = NULL;
-
- /* Copy filter bytecode */
- filter = zmalloc(sizeof(*filter) + orig_f->len);
- if (!filter) {
- PERROR("zmalloc alloc filter bytecode");
- goto error;
- }
-
- memcpy(filter, orig_f, sizeof(*filter) + orig_f->len);
-
-error:
- return filter;
-}