summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/lib/allocmbt.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ipfilter/lib/allocmbt.c')
-rw-r--r--contrib/ipfilter/lib/allocmbt.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/ipfilter/lib/allocmbt.c b/contrib/ipfilter/lib/allocmbt.c
new file mode 100644
index 0000000..df77684
--- /dev/null
+++ b/contrib/ipfilter/lib/allocmbt.c
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2012 by Darren Reed.
+ *
+ * See the IPFILTER.LICENCE file for details on licencing.
+ *
+ * $Id: allocmbt.c,v 1.1.4.1 2012/07/22 08:04:24 darren_r Exp $
+ */
+
+#include "ipf.h"
+
+mb_t *allocmbt(size_t len)
+{
+ mb_t *m;
+
+ m = (mb_t *)malloc(sizeof(mb_t));
+ if (m == NULL)
+ return NULL;
+ m->mb_len = len;
+ m->mb_next = NULL;
+ m->mb_data = (char *)m->mb_buf;
+ return m;
+}
OpenPOWER on IntegriCloud