forked from Imagelibrary/binutils-gdb
libctf, types: ensure the emission of ECTF_NOPARENT
ctf_variable_iter was returning a (positive!) error code rather than setting the error in the passed-in ctf_file_t. Reviewed-by: Nick Alcock <nick.alcock@oracle.com> libctf/ * ctf-types.c (ctf_variable_iter): Fix error return.
This commit is contained in:
committed by
Nick Alcock
parent
ec388c16cd
commit
b7190c821e
@@ -1,3 +1,7 @@
|
|||||||
|
2020-07-22 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
|
||||||
|
|
||||||
|
* ctf-types.c (ctf_variable_iter): Fix error return.
|
||||||
|
|
||||||
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
|
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
|
||||||
|
|
||||||
* ctf-open.c (ctf_bufopen_internal): Diagnose invalid flags.
|
* ctf-open.c (ctf_bufopen_internal): Diagnose invalid flags.
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ ctf_variable_iter (ctf_file_t *fp, ctf_variable_f *func, void *arg)
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if ((fp->ctf_flags & LCTF_CHILD) && (fp->ctf_parent == NULL))
|
if ((fp->ctf_flags & LCTF_CHILD) && (fp->ctf_parent == NULL))
|
||||||
return ECTF_NOPARENT;
|
return (ctf_set_errno (fp, ECTF_NOPARENT));
|
||||||
|
|
||||||
if (!(fp->ctf_flags & LCTF_RDWR))
|
if (!(fp->ctf_flags & LCTF_RDWR))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user