lib/ctf-ir/clock-class.c: serialize `true`/`false` instead of `TRUE`/`FALSE`
[babeltrace.git] / lib / ctf-ir / clock-class.c
index 7d02a989ec9ddad8b30d80fcc5166d3ed04544bd..a7ac560d5a270085a26da6c50ea13c41eb2d11aa 100644 (file)
@@ -556,12 +556,16 @@ void bt_ctf_clock_class_serialize(struct bt_ctf_clock_class *clock_class,
        g_string_append(context->string, "clock {\n");
        g_string_append_printf(context->string, "\tname = %s;\n",
                clock_class->name->str);
-       g_string_append_printf(context->string,
-               "\tuuid = \"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\";\n",
-               uuid[0], uuid[1], uuid[2], uuid[3],
-               uuid[4], uuid[5], uuid[6], uuid[7],
-               uuid[8], uuid[9], uuid[10], uuid[11],
-               uuid[12], uuid[13], uuid[14], uuid[15]);
+
+       if (clock_class->uuid_set) {
+               g_string_append_printf(context->string,
+                       "\tuuid = \"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\";\n",
+                       uuid[0], uuid[1], uuid[2], uuid[3],
+                       uuid[4], uuid[5], uuid[6], uuid[7],
+                       uuid[8], uuid[9], uuid[10], uuid[11],
+                       uuid[12], uuid[13], uuid[14], uuid[15]);
+       }
+
        if (clock_class->description) {
                g_string_append_printf(context->string, "\tdescription = \"%s\";\n",
                        clock_class->description->str);
@@ -576,7 +580,7 @@ void bt_ctf_clock_class_serialize(struct bt_ctf_clock_class *clock_class,
        g_string_append_printf(context->string, "\toffset = %" PRIu64 ";\n",
                clock_class->offset);
        g_string_append_printf(context->string, "\tabsolute = %s;\n",
-               clock_class->absolute ? "TRUE" : "FALSE");
+               clock_class->absolute ? "true" : "false");
        g_string_append(context->string, "};\n\n");
 }
 
This page took 0.023651 seconds and 4 git commands to generate.