From: Egeyar Bagcioglu Date: Wed, 3 Jun 2020 16:36:51 +0000 (+0100) Subject: libctf, types: ensure the emission of ECTF_NOPARENT X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b7190c821e529d7858cff7c2fcc57304a1d38d2b;p=binutils-gdb.git 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 libctf/ * ctf-types.c (ctf_variable_iter): Fix error return. --- diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 45caf217cb2..f3ac4cc91e7 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,7 @@ +2020-07-22 Egeyar Bagcioglu + + * ctf-types.c (ctf_variable_iter): Fix error return. + 2020-07-22 Nick Alcock * ctf-open.c (ctf_bufopen_internal): Diagnose invalid flags. diff --git a/libctf/ctf-types.c b/libctf/ctf-types.c index d7ed0e31dca..550068250fd 100644 --- a/libctf/ctf-types.c +++ b/libctf/ctf-types.c @@ -495,7 +495,7 @@ ctf_variable_iter (ctf_file_t *fp, ctf_variable_f *func, void *arg) int rc; 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)) {