Update symbol name length max size to 256
[lttng-modules.git] / lttng-context-nice.c
index d7fafb9d3939af55615effcd8a44e0b4fe5cab67..9b99b54924650b1da1b510bb4255da2380d3f193 100644 (file)
@@ -40,11 +40,14 @@ void nice_record(struct lttng_ctx_field *field,
 int lttng_add_nice_to_ctx(struct lttng_ctx **ctx)
 {
        struct lttng_ctx_field *field;
-       int ret;
 
        field = lttng_append_context(ctx);
        if (!field)
-               return ret;
+               return -ENOMEM;
+       if (lttng_find_context(*ctx, "nice")) {
+               lttng_remove_context_field(ctx, field);
+               return -EEXIST;
+       }
        field->event_field.name = "nice";
        field->event_field.type.atype = atype_integer;
        field->event_field.type.u.basic.integer.size = sizeof(int) * CHAR_BIT;
This page took 0.022916 seconds and 4 git commands to generate.