aboutsummaryrefslogtreecommitdiff
path: root/src/xalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xalloc.c')
-rw-r--r--src/xalloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xalloc.c b/src/xalloc.c
index d12a04c..6ab6802 100644
--- a/src/xalloc.c
+++ b/src/xalloc.c
@@ -49,5 +49,10 @@ xmemdup(void const *p, size_t s)
return memcpy(xmalloc(s), p, s);
}
+char *
+xstrdup(const char *s)
+{
+ return xmemdup(s, strlen(s) + 1);
+}

Return to:

Send suggestions and report system problems to the System administrator.