libctf: make ctf_dynamic_type() the inverse of ctf_static_type()

They're meant to be inverses, which makes it unfortunate that
they check different bounds.  No visible effect yet, since
ctf_typemax and ctf_stypes currently cover the entire type ID
space, but will have an effect shortly.
This commit is contained in:
Nick Alcock
2025-01-29 12:35:47 +00:00
parent b875301e74
commit 003f19bfa7

View File

@@ -287,8 +287,8 @@ ctf_dynamic_type (const ctf_dict_t *fp, ctf_id_t type)
idx = LCTF_TYPE_TO_INDEX(fp, type);
if ((unsigned long) idx <= fp->ctf_typemax)
return ctf_dtd_lookup (fp, id);
if ((unsigned long) idx > fp->ctf_stypes)
return ctf_dtd_lookup (fp, type);
return NULL;
}