]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libctf, create: the unknown type
authorNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 10:43:26 +0000 (11:43 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 9 Dec 2025 13:02:26 +0000 (13:02 +0000)
Just as for typedefs, this is just catching up with API changes on the
type-addition side.

libctf/ctf-create.c

index 06ae7a896393fc2b9b824e1854b2f77dcd699f51..60d83f79838f123b443b0f503fd4489724dc19cd 100644 (file)
@@ -1427,13 +1427,14 @@ ctf_add_unknown (ctf_dict_t *fp, uint32_t flag, const char *name)
        }
     }
 
-  if ((type = ctf_add_generic (fp, flag, name, CTF_K_UNKNOWN, 0, &dtd)) == CTF_ERR)
+  if ((dtd = ctf_add_generic (fp, flag, name, CTF_K_UNKNOWN, 0, 0, 0,
+                             NULL)) == NULL)
     return CTF_ERR;            /* errno is set for us.  */
 
-  dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_UNKNOWN, flag, 0);
-  dtd->dtd_data.ctt_type = 0;
+  dtd->dtd_data->ctt_info = CTF_TYPE_INFO (CTF_K_UNKNOWN, flag, 0);
+  dtd->dtd_data->ctt_type = 0;
 
-  return type;
+  return dtd->dtd_type;
 }
 
 ctf_id_t