diff options
-rw-r--r-- | libctf/ChangeLog | 4 | ||||
-rw-r--r-- | libctf/ctf-dump.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 767d48c..f0a1754 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,9 @@ 2021-03-02 Nick Alcock <nick.alcock@oracle.com> + * ctf-dump.c (ctf_dump_format_type): Fix signed/unsigned confusion. + +2021-03-02 Nick Alcock <nick.alcock@oracle.com> + * ctf-dedup.c (ctf_dedup): Pass on errors from ctf_dedup_hash_type. Call ctf_dedup_fini properly on other errors. (ctf_dedup_emit_type): Set the errno on dynhash insertion failure. diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c index 758d28d..788355d 100644 --- a/libctf/ctf-dump.c +++ b/libctf/ctf-dump.c @@ -144,7 +144,7 @@ ctf_dump_format_type (ctf_dict_t *fp, ctf_id_t id, int flag) if (ctf_type_encoding (fp, id, &ep) == 0) { - if (ep.cte_bits != ctf_type_size (fp, id) * CHAR_BIT + if ((ssize_t) ep.cte_bits != ctf_type_size (fp, id) * CHAR_BIT && flag & CTF_FT_BITFIELD) { if (asprintf (&bit, ":%i", ep.cte_bits) < 0) @@ -154,7 +154,7 @@ ctf_dump_format_type (ctf_dict_t *fp, ctf_id_t id, int flag) bit = NULL; } - if (ep.cte_bits != ctf_type_size (fp, id) * CHAR_BIT + if ((ssize_t) ep.cte_bits != ctf_type_size (fp, id) * CHAR_BIT || ep.cte_offset != 0) { const char *slice = ""; |