aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-impl.h
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-06-19 12:14:16 +0100
committerNick Alcock <nick.alcock@oracle.com>2019-06-21 13:04:01 +0100
commit24865428034f44d9fffe6b2d9a318e1bd507c63a (patch)
treed86d3a456e6ac6988c54cbb1f05e2fff0925ba52 /libctf/ctf-impl.h
parent890f750a3b053532a4b839a2dd6243076de12031 (diff)
downloadgdb-24865428034f44d9fffe6b2d9a318e1bd507c63a.zip
gdb-24865428034f44d9fffe6b2d9a318e1bd507c63a.tar.gz
gdb-24865428034f44d9fffe6b2d9a318e1bd507c63a.tar.bz2
libctf: handle errors on dynhash insertion better
We were missing several cases where dynhash insertion might fail, likely due to OOM but possibly for other reasons. Pass the errors on. libctf/ * ctf-create.c (ctf_dtd_insert): Pass on error returns from ctf_dynhash_insert. (ctf_dvd_insert): Likewise. (ctf_add_generic): Likewise. (ctf_add_variable): Likewise. * ctf-impl.h: Adjust declarations.
Diffstat (limited to 'libctf/ctf-impl.h')
-rw-r--r--libctf/ctf-impl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h
index fa9c574..52aef24 100644
--- a/libctf/ctf-impl.h
+++ b/libctf/ctf-impl.h
@@ -316,12 +316,12 @@ extern void ctf_list_append (ctf_list_t *, void *);
extern void ctf_list_prepend (ctf_list_t *, void *);
extern void ctf_list_delete (ctf_list_t *, void *);
-extern void ctf_dtd_insert (ctf_file_t *, ctf_dtdef_t *);
+extern int ctf_dtd_insert (ctf_file_t *, ctf_dtdef_t *);
extern void ctf_dtd_delete (ctf_file_t *, ctf_dtdef_t *);
extern ctf_dtdef_t *ctf_dtd_lookup (const ctf_file_t *, ctf_id_t);
extern ctf_dtdef_t *ctf_dynamic_type (const ctf_file_t *, ctf_id_t);
-extern void ctf_dvd_insert (ctf_file_t *, ctf_dvdef_t *);
+extern int ctf_dvd_insert (ctf_file_t *, ctf_dvdef_t *);
extern void ctf_dvd_delete (ctf_file_t *, ctf_dvdef_t *);
extern ctf_dvdef_t *ctf_dvd_lookup (const ctf_file_t *, const char *);