Fix uninitialized return variable in error path for contexts
[lttng-modules.git] / lttng-context-comm.c
index 6e51bf854a3bad17765085d493c7536d94686b81..ede3f51a0d4bd9ffd9568d75a28e1fc4ebc75668 100644 (file)
@@ -41,11 +41,10 @@ void comm_record(struct lttng_ctx_field *field,
 int lttng_add_comm_to_ctx(struct lttng_ctx **ctx)
 {
        struct lttng_ctx_field *field;
-       int ret;
 
        field = lttng_append_context(ctx);
        if (!field)
-               return ret;
+               return -ENOMEM;
        field->event_field.name = "comm";
        field->event_field.type.atype = atype_array;
        field->event_field.type.u.array.elem_type.atype = atype_integer;
This page took 0.022303 seconds and 4 git commands to generate.