allocmbt.c revision 303975
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 11mb_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} 23