aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c')
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
index a735b6674a1e..6279ffacdaeb 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
@@ -206,6 +206,13 @@ err:
return (-1);
}
+boolean_t
+dt_strtab_empty(dt_strtab_t *sp)
+{
+ /* Always contains "\0". */
+ return (sp->str_nstrs == 1);
+}
+
ssize_t
dt_strtab_index(dt_strtab_t *sp, const char *str)
{