Standardize `!ptr` i/o `ptr == NULL`, `ptr` i/o `ptr != NULL`
[babeltrace.git] / src / plugins / text / details / obj-lifetime-mgmt.c
index 182c8b66ad3b03eafbf16973f6d8a0a139c65c3d..8da5cf162cef562b28237bba37ed04c069c1f6d5 100644 (file)
@@ -97,7 +97,7 @@ bool details_need_to_write_meta_object(struct details_write_ctx *ctx,
        details_tc_meta = g_hash_table_lookup(ctx->details_comp->meta, tc);
        BT_ASSERT(details_tc_meta);
        need_to_write =
-               g_hash_table_lookup(details_tc_meta->objects, obj) == NULL;
+               !g_hash_table_lookup(details_tc_meta->objects, obj);
 
 end:
        return need_to_write;
@@ -130,7 +130,7 @@ bool details_need_to_write_trace_class(struct details_write_ctx *ctx,
 
        BT_ASSERT(ctx->details_comp->meta);
        details_tc_meta = g_hash_table_lookup(ctx->details_comp->meta, tc);
-       need_to_write = details_tc_meta == NULL;
+       need_to_write = !details_tc_meta;
 
 end:
        return need_to_write;
@@ -232,9 +232,7 @@ error:
        ret = -1;
 
 end:
-       if (details_trace) {
-               g_free(details_trace);
-       }
+       g_free(details_trace);
 
        return ret;
 }
This page took 0.030705 seconds and 4 git commands to generate.