summaryrefslogtreecommitdiff
path: root/util/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/util.c')
-rw-r--r--util/util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/util.c b/util/util.c
index dccc90b..904ef26 100644
--- a/util/util.c
+++ b/util/util.c
@@ -24,6 +24,16 @@ char *strdupn(char *s, size_t len)
return ret;
}
+char *xstrdup(char *s)
+{
+ char *p;
+
+ p = strdup(s);
+ if (!p && s)
+ die("Out of memory");
+ return p;
+}
+
char *strjoin(char *u, char *v)
{
size_t n;