Merge pull request #514 from BastianPoe/contiki-mmem1

mmem: Prevent duplicate init of mmem
This commit is contained in:
Nicolas Tsiftes 2014-11-28 19:57:17 +01:00
commit 61ec5bf896

View File

@ -151,8 +151,13 @@ mmem_free(struct mmem *m)
void void
mmem_init(void) mmem_init(void)
{ {
static int inited = 0;
if(inited) {
return;
}
list_init(mmemlist); list_init(mmemlist);
avail_memory = MMEM_SIZE; avail_memory = MMEM_SIZE;
inited = 1;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/