diff options
-rw-r--r-- | libctf/ChangeLog | 7 | ||||
-rw-r--r-- | libctf/ctf-error.c | 3 | ||||
-rw-r--r-- | libctf/ctf-impl.h | 1 | ||||
-rw-r--r-- | libctf/ctf-subr.c | 6 |
4 files changed, 9 insertions, 8 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 4830284..d54af35 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,12 @@ 2020-07-22 Nick Alcock <nick.alcock@oracle.com> + * ctf-impl.h (ctf_strerror): Delete. + * ctf-subr.c (ctf_strerror): Likewise. + * ctf-error.c (ctf_errmsg): Stop using ctf_strerror: just use + strerror directly. + +2020-07-22 Nick Alcock <nick.alcock@oracle.com> + * ctf-impl.c (ctf_file_t) <ctf_parent_unreffed>: New. (ctf_import_unref): New. * ctf-open.c (ctf_file_close) Drop the refcount all the way to diff --git a/libctf/ctf-error.c b/libctf/ctf-error.c index 84d14d5..20971f4 100644 --- a/libctf/ctf-error.c +++ b/libctf/ctf-error.c @@ -19,6 +19,7 @@ #include <ctf-impl.h> #include <stddef.h> +#include <string.h> /* This construct is due to Bruno Haible: much thanks. */ @@ -67,7 +68,7 @@ ctf_errmsg (int error) if (error >= ECTF_BASE && (error - ECTF_BASE) < ECTF_NERR) str = _ctf_errlist.str + _ctf_erridx[error - ECTF_BASE]; else - str = ctf_strerror (error); + str = (const char *) strerror (error); return (str ? str : "Unknown error"); } diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h index 4c8a37c..71b732a 100644 --- a/libctf/ctf-impl.h +++ b/libctf/ctf-impl.h @@ -548,7 +548,6 @@ extern ssize_t ctf_pread (int fd, void *buf, ssize_t count, off_t offset); extern void *ctf_realloc (ctf_file_t *, void *, size_t); extern char *ctf_str_append (char *, const char *); extern char *ctf_str_append_noerr (char *, const char *); -extern const char *ctf_strerror (int); extern ctf_id_t ctf_type_resolve_unsliced (ctf_file_t *, ctf_id_t); extern int ctf_type_kind_unsliced (ctf_file_t *, ctf_id_t); diff --git a/libctf/ctf-subr.c b/libctf/ctf-subr.c index 0b49ae9..455f18d 100644 --- a/libctf/ctf-subr.c +++ b/libctf/ctf-subr.c @@ -122,12 +122,6 @@ ctf_pread (int fd, void *buf, ssize_t count, off_t offset) return acc; } -const char * -ctf_strerror (int err) -{ - return (const char *) (strerror (err)); -} - /* Set the CTF library client version to the specified version. If version is zero, we just return the default library version number. */ int |