forked from Imagelibrary/binutils-gdb
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user