aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-types.c
diff options
context:
space:
mode:
authorEgeyar Bagcioglu <egeyar.bagcioglu@oracle.com>2020-06-03 17:36:51 +0100
committerNick Alcock <nick.alcock@oracle.com>2020-07-22 18:01:51 +0100
commitb7190c821e529d7858cff7c2fcc57304a1d38d2b (patch)
treec60d7720d875b4f7938d67badc5d5e41ec613708 /libctf/ctf-types.c
parentec388c16cd4217a64907e4e133d2102cc4fe608a (diff)
downloadgdb-b7190c821e529d7858cff7c2fcc57304a1d38d2b.zip
gdb-b7190c821e529d7858cff7c2fcc57304a1d38d2b.tar.gz
gdb-b7190c821e529d7858cff7c2fcc57304a1d38d2b.tar.bz2
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.
Diffstat (limited to 'libctf/ctf-types.c')
-rw-r--r--libctf/ctf-types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libctf/ctf-types.c b/libctf/ctf-types.c
index d7ed0e3..5500682 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))
{