aboutsummaryrefslogtreecommitdiffstats
path: root/xmalloc.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-15 14:48:34 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-15 14:48:34 +0000
commit4c2423a98542de4ab80ff75cb5987aa59f788ee1 (patch)
treee27ebc534bd4815c5b51ecf8f35f4640336d7c17 /xmalloc.c
parentc1e1a25354f0072bf6bb871361f0316ed4e90593 (diff)
downloadfetchmail-4c2423a98542de4ab80ff75cb5987aa59f788ee1.tar.gz
fetchmail-4c2423a98542de4ab80ff75cb5987aa59f788ee1.tar.bz2
fetchmail-4c2423a98542de4ab80ff75cb5987aa59f788ee1.zip
Simplify the autoconfig process a lot.
svn path=/trunk/; revision=337
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/xmalloc.c b/xmalloc.c
index 3679b508..9ea57c41 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -13,6 +13,7 @@
#include <config.h>
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include "fetchmail.h"
@@ -24,7 +25,7 @@
XMALLOCTYPE *
xmalloc (n)
-size_t n;
+int n;
{
XMALLOCTYPE *p;
@@ -35,3 +36,12 @@ size_t n;
}
return(p);
}
+
+char *xstrdup(s)
+char *s;
+{
+ char *p;
+ p = (char *) xmalloc(strlen(s)+1);
+ strcpy(p,s);
+ return p;
+}