ctf: avoid using computing offset from nullptr pointer
[babeltrace.git] / src / plugins / ctf / common / metadata / visitor-generate-ir.cpp
index a55cbc375fb20d4b9b6dbeb8eff84c8123b31102..33fa1ccb3a2b076aa2cc80ccb86f06da19bfa8a7 100644 (file)
@@ -1127,10 +1127,8 @@ static int visit_field_class_declarator(struct ctf_visitor_generate_ir *ctx,
 
     /* Find the right nested declaration if not provided */
     if (!nested_decl) {
-        struct bt_list_head *pointers =
-            &node_field_class_declarator->u.field_class_declarator.pointers;
-
-        if (node_field_class_declarator && !bt_list_empty(pointers)) {
+        if (node_field_class_declarator &&
+            !bt_list_empty(&node_field_class_declarator->u.field_class_declarator.pointers)) {
             GQuark qalias;
 
             /*
This page took 0.023254 seconds and 4 git commands to generate.