Fix uninitialized return variable in error path for contexts
[lttng-modules.git] / lttng-context-ppid.c
index 342aa343337b2a55a380da763651a9e22225cf96..9f647ab1a079eac1066057cebefea2205a7b8ee7 100644 (file)
@@ -43,11 +43,10 @@ void ppid_record(struct lttng_ctx_field *field,
 int lttng_add_ppid_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 = "ppid";
        field->event_field.type.atype = atype_integer;
        field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;
This page took 0.022565 seconds and 4 git commands to generate.