X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fdispatch.cpp;h=8e80c29855e934576b0a17f8814433d835f0114f;hb=f149493493fbd8a3efa4748832c03278c96c38ca;hp=7988f1ba8a212894dc09d7c3e8338f267b6fb221;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/dispatch.cpp b/src/bin/lttng-sessiond/dispatch.cpp index 7988f1ba8..8e80c2985 100644 --- a/src/bin/lttng-sessiond/dispatch.cpp +++ b/src/bin/lttng-sessiond/dispatch.cpp @@ -21,12 +21,14 @@ #include "lttng-sessiond.hpp" #include "thread.hpp" +namespace { struct thread_notifiers { struct ust_cmd_queue *ust_cmd_queue; int apps_cmd_pipe_write_fd; int apps_cmd_notify_pipe_write_fd; int dispatch_thread_exit; }; +} /* namespace */ /* * For each tracing session, update newly registered apps. The session list @@ -292,7 +294,7 @@ static void *thread_dispatch_ust_registration(void *data) ust_cmd->reg_msg.major, ust_cmd->reg_msg.minor); if (ust_cmd->reg_msg.type == LTTNG_UST_CTL_SOCKET_CMD) { - wait_node = (ust_reg_wait_node *) zmalloc(sizeof(*wait_node)); + wait_node = zmalloc(); if (!wait_node) { PERROR("zmalloc wait_node dispatch"); ret = close(ust_cmd->sock); @@ -510,7 +512,7 @@ bool launch_ust_dispatch_thread(struct ust_cmd_queue *cmd_queue, struct lttng_thread *thread; struct thread_notifiers *notifiers; - notifiers = (thread_notifiers *) zmalloc(sizeof(*notifiers)); + notifiers = zmalloc(); if (!notifiers) { goto error; }