libctf: error-handling fixes
authorNick Alcock <nick.alcock@oracle.com>
Fri, 20 Nov 2020 13:34:04 +0000 (13:34 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 20 Nov 2020 13:34:12 +0000 (13:34 +0000)
commit8f235c90a287ee961153dd94f5ca28b033ebb668
treed43c3ab0cf3fae2b62081fa92e1c3f534efdf205
parent97a2a623d0193dbfc92d92545b63aaffd6099272
libctf: error-handling fixes

libctf/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

* ctf-create.c (ctf_dtd_insert): Set ENOMEM on the dict if out of memory.
(ctf_dvd_insert): Likewise.
(ctf_add_function): Report ECTF_RDONLY if this dict is not writable.
* ctf-subr.c (ctf_err_warn): Only debug-dump passed-in warnings if
the passed-in error code is nonzero: the error on the dict for
warnings may relate to a previous error.
libctf/ChangeLog
libctf/ctf-create.c
libctf/ctf-subr.c