allocmbt.c revision 254219
1116575Smurray/* 2116575Smurray * Copyright (C) 2012 by Darren Reed. 3116575Smurray * 4116575Smurray * See the IPFILTER.LICENCE file for details on licencing. 5116575Smurray * 6116575Smurray * $Id: allocmbt.c,v 1.1.4.1 2012/07/22 08:04:24 darren_r Exp $ 7116575Smurray */ 8116575Smurray 9116575Smurray#include "ipf.h" 10116575Smurray 11116575Smurraymb_t *allocmbt(size_t len) 12116575Smurray{ 13116575Smurray mb_t *m; 14116575Smurray 15116575Smurray m = (mb_t *)malloc(sizeof(mb_t)); 16116575Smurray if (m == NULL) 17116575Smurray return NULL; 18116575Smurray m->mb_len = len; 19116575Smurray m->mb_next = NULL; 20116575Smurray m->mb_data = (char *)m->mb_buf; 21116575Smurray return m; 22116575Smurray} 23116575Smurray