]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ipfilter/lib/allocmbt.c
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ipfilter / lib / allocmbt.c
1 /*
2  * Copyright (C) 2012 by Darren Reed.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  * $Id: allocmbt.c,v 1.1.4.1 2012/07/22 08:04:24 darren_r Exp $
7  */
8
9 #include "ipf.h"
10
11 mb_t *allocmbt(size_t len)
12 {
13         mb_t *m;
14
15         m = (mb_t *)malloc(sizeof(mb_t));
16         if (m == NULL)
17                 return NULL;
18         m->mb_len = len;
19         m->mb_next = NULL;
20         m->mb_data = (char *)m->mb_buf;
21         return m;
22 }