Cleanup: ust-tracepoint-event.h: extract `__num_fields` in a variable
[lttng-ust.git] / liblttng-ust / lttng-context-procname.c
index 8c1520ad51f221b467dd38815cd66868a75b137d..73f38878f872557283a13b171977ca245c2969a5 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <stddef.h>
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
 #include <lttng/ringbuffer-config.h>
@@ -78,10 +79,7 @@ void lttng_context_procname_reset(void)
 static
 size_t procname_get_size(struct lttng_ctx_field *field, size_t offset)
 {
-       size_t size = 0;
-
-       size += LTTNG_UST_PROCNAME_LEN;
-       return size;
+       return LTTNG_UST_PROCNAME_LEN;
 }
 
 static
@@ -99,10 +97,7 @@ static
 void procname_get_value(struct lttng_ctx_field *field,
                struct lttng_ctx_value *value)
 {
-       char *procname;
-
-       procname = wrapper_getprocname();
-       value->u.str = procname;
+       value->u.str = wrapper_getprocname();
 }
 
 int lttng_add_procname_to_ctx(struct lttng_ctx **ctx)
This page took 0.025066 seconds and 4 git commands to generate.