aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'libctf/ctf-util.c')
-rw-r--r--libctf/ctf-util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libctf/ctf-util.c b/libctf/ctf-util.c
index b813c0d..f27c768 100644
--- a/libctf/ctf-util.c
+++ b/libctf/ctf-util.c
@@ -80,6 +80,14 @@ ctf_list_delete (ctf_list_t *lp, void *existing)
lp->l_prev = p->l_prev;
}
+/* Return 1 if the list is empty. */
+
+int
+ctf_list_empty_p (ctf_list_t *lp)
+{
+ return (lp->l_next == NULL && lp->l_prev == NULL);
+}
+
/* Convert a 32-bit ELF symbol into Elf64 and return a pointer to it. */
Elf64_Sym *