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 <[email protected]>
libctf/
* ctf-types.c (ctf_variable_iter): Fix error return.
+
+ * ctf-types.c (ctf_variable_iter): Fix error return.
+
* ctf-open.c (ctf_bufopen_internal): Diagnose invalid flags.
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))
{