This matters for the case of unnamed bitfields, whose names are the null
string. These are special in that they are the only members whose
"names" are allowed to be duplicated in a single struct, but we were
only handling this for the case where name == NULL. Translate "" to
NULL to help callers.
libctf/
* ctf-create.c (ctf_add_member_offset): Support names of ""
as if they were the null pointer.
+2020-07-22 Nick Alcock <nick.alcock@oracle.com>
+
+ * ctf-create.c (ctf_add_member_offset): Support names of ""
+ as if they were the null pointer.
+
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
* ctf-open.c (init_types): Remove typeless CTF_K_FORWARD
if (dtd == NULL)
return (ctf_set_errno (fp, ECTF_BADID));
+ if (name != NULL && name[0] == '\0')
+ name = NULL;
+
kind = LCTF_INFO_KIND (fp, dtd->dtd_data.ctt_info);
root = LCTF_INFO_ISROOT (fp, dtd->dtd_data.ctt_info);
vlen = LCTF_INFO_VLEN (fp, dtd->dtd_data.ctt_info);