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 * 12 allocmbt(size_t len) 13 { 14 mb_t *m; 15 16 m = (mb_t *)malloc(sizeof(mb_t)); 17 if (m == NULL) 18 return (NULL); 19 m->mb_len = len; 20 m->mb_next = NULL; 21 m->mb_data = (char *)m->mb_buf; 22 return (m); 23 } 24