summaryrefslogtreecommitdiffabout
path: root/src/xalloc.c
authorSergey Poznyakoff <gray@gnu.org.ua>2013-11-07 11:46:12 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-11-07 11:46:12 (GMT)
commitac4200fa46eebfc9227130739ae7f867e3fd0a20 (patch) (side-by-side diff)
treedcfda4ae2e86aba36ea5b34296fb5972dd715ebd /src/xalloc.c
parent29aae24c51c9682a789c09e37e631b886affcbf7 (diff)
downloadvmod-binlog-ac4200fa46eebfc9227130739ae7f867e3fd0a20.tar.gz
vmod-binlog-ac4200fa46eebfc9227130739ae7f867e3fd0a20.tar.bz2
Fix interval initialization from the module_init function.
* doc/vmod-binlog.3: Update. * src/binlogsel.c (interval) <name>: Remove const. (interval_add): duplicate the name. * src/xalloc.c (xstrdup): New function. * src/xalloc.h: Likewise.
Diffstat (limited to 'src/xalloc.c') (more/less context) (ignore whitespace changes)
-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.