From: Nick Alcock Date: Fri, 25 Apr 2025 10:41:45 +0000 (+0100) Subject: libctf, create: typedefs X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83e9ca77b2f3fba5f71c2a1490819f198adc06a8;p=thirdparty%2Fbinutils-gdb.git libctf, create: typedefs Nothing here but adjustment to internal API changes. Typedefs have no special properties that need querying, so there are no changes to ctf-types.c at all. --- diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index 9d02bee7a23..11b27f0deae 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -1442,7 +1442,6 @@ ctf_add_typedef (ctf_dict_t *fp, uint32_t flag, const char *name, ctf_id_t ref) { ctf_dtdef_t *dtd; - ctf_id_t type; ctf_dict_t *tmp = fp; if (ref == CTF_ERR || ref > CTF_MAX_TYPE) @@ -1451,17 +1450,17 @@ ctf_add_typedef (ctf_dict_t *fp, uint32_t flag, const char *name, if (name == NULL || name[0] == '\0') return (ctf_set_typed_errno (fp, ECTF_NONAME)); - if (ref != 0 && ctf_lookup_by_id (&tmp, ref) == NULL) + if (ref != 0 && ctf_lookup_by_id (&tmp, ref, NULL) == NULL) return CTF_ERR; /* errno is set for us. */ - if ((type = ctf_add_generic (fp, flag, name, CTF_K_TYPEDEF, 0, - &dtd)) == CTF_ERR) + if ((dtd = ctf_add_generic (fp, flag, name, CTF_K_TYPEDEF, 0, 0, 0, + NULL)) == NULL) return CTF_ERR; /* errno is set for us. */ - dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_TYPEDEF, flag, 0); - dtd->dtd_data.ctt_type = (uint32_t) ref; + dtd->dtd_data->ctt_info = CTF_TYPE_INFO (CTF_K_TYPEDEF, 0, 0); + dtd->dtd_data->ctt_type = (uint32_t) ref; - return type; + return dtd->dtd_type; } ctf_id_t