X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fsessiond-trace-chunks.cpp;h=34f14f187fbe5d615cc0fd849a9fb3855722bced;hb=cfaa204e7ab4317ee1efd1b430ed3ddc2633068a;hp=0a5c44825414bc720fe6081e459b5b3410c349b4;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/sessiond-trace-chunks.cpp b/src/bin/lttng-relayd/sessiond-trace-chunks.cpp index 0a5c44825..34f14f187 100644 --- a/src/bin/lttng-relayd/sessiond-trace-chunks.cpp +++ b/src/bin/lttng-relayd/sessiond-trace-chunks.cpp @@ -56,6 +56,7 @@ struct sessiond_trace_chunk_registry { struct cds_lfht *ht; }; +namespace { struct trace_chunk_registry_ht_key { lttng_uuid sessiond_uuid; }; @@ -70,6 +71,7 @@ struct trace_chunk_registry_ht_element { struct lttng_trace_chunk_registry *trace_chunk_registry; struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry; }; +} /* namespace */ static unsigned long trace_chunk_registry_ht_key_hash( @@ -197,7 +199,7 @@ int trace_chunk_registry_ht_element_create( goto end; } - new_element = (trace_chunk_registry_ht_element *) zmalloc(sizeof(*new_element)); + new_element = zmalloc(); if (!new_element) { ret = -1; goto end; @@ -263,7 +265,7 @@ end: struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry_create(void) { struct sessiond_trace_chunk_registry *sessiond_registry = - (sessiond_trace_chunk_registry *) zmalloc(sizeof(*sessiond_registry)); + zmalloc(); if (!sessiond_registry) { goto end;