X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Futils.c;h=e806082e324678c026a5e112ac7b2d3e28ccc272;hp=febf2305826a5ce31c7033e111457aae5040618c;hb=bae46a81520110e52c5af423ce712b9099fe23dd;hpb=44760c20f4fc255b63894ca758cf2ee5f253220b diff --git a/src/bin/lttng-sessiond/utils.c b/src/bin/lttng-sessiond/utils.c index febf23058..e806082e3 100644 --- a/src/bin/lttng-sessiond/utils.c +++ b/src/bin/lttng-sessiond/utils.c @@ -16,7 +16,7 @@ #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. @@ -41,7 +41,7 @@ int notify_thread_pipe(int wpipe) 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; @@ -98,26 +98,3 @@ const char *consumer_output_get_base_path(const struct consumer_output *output) 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; -}