aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'libctf/ctf-archive.c')
-rw-r--r--libctf/ctf-archive.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libctf/ctf-archive.c b/libctf/ctf-archive.c
index dc01e2e..6c4595f 100644
--- a/libctf/ctf-archive.c
+++ b/libctf/ctf-archive.c
@@ -485,6 +485,10 @@ ctf_arc_open_internal (const char *filename, int *errp)
is private.) */
arc->ctfa_magic = s.st_size;
close (fd);
+
+ if (errp)
+ *errp = 0;
+
return arc;
err_unmap:
@@ -588,6 +592,9 @@ ctf_dict_open_sections (const ctf_archive_t *arc,
const char *name,
int *errp)
{
+ if (errp)
+ *errp = 0;
+
if (arc->ctfi_is_archive)
{
ctf_dict_t *ret;
@@ -761,7 +768,7 @@ ctf_arc_import_parent (const ctf_archive_t *arc, ctf_dict_t *fp, int *errp)
{
if ((fp->ctf_flags & LCTF_CHILD) && fp->ctf_parname && !fp->ctf_parent)
{
- int err;
+ int err = 0;
ctf_dict_t *parent = ctf_dict_open_cached ((ctf_archive_t *) arc,
fp->ctf_parname, &err);
if (errp)