mirror of
https://github.com/Stichting-MINIX-Research-Foundation/netbsd.git
synced 2025-09-13 00:57:28 -04:00
25 lines
448 B
C
25 lines
448 B
C
/* $NetBSD: allocmbt.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $ */
|
|
|
|
/*
|
|
* Copyright (C) 2012 by Darren Reed.
|
|
*
|
|
* See the IPFILTER.LICENCE file for details on licencing.
|
|
*
|
|
* Id: allocmbt.c,v 1.1.1.2 2012/07/22 13:44:38 darrenr 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;
|
|
}
|