Fix bug #47512: MPU_COMPATIBLE may fail on empty pool

This commit is contained in:
Dirk Ziegelmeier
2016-04-27 21:14:17 +02:00
parent e653ac9db7
commit 30e6f908ee
2 changed files with 17 additions and 8 deletions

View File

@@ -62,10 +62,6 @@ struct netif;
return errorval; \
} \
} while(0)
#define API_VAR_ALLOC_DONTFAIL(type, pool, name) do { \
name = (type *)memp_malloc(pool); \
LWIP_ASSERT("pool empty", name != NULL); \
} while(0)
#define API_VAR_FREE(pool, name) memp_free(pool, name)
#define API_VAR_FREE_POOL(pool, name) LWIP_MEMPOOL_FREE(pool, name)
#define API_EXPR_REF(expr) &(expr)
@@ -82,7 +78,6 @@ struct netif;
#define API_VAR_DECLARE(type, name) type name
#define API_VAR_ALLOC(type, pool, name, errorval)
#define API_VAR_ALLOC_POOL(type, pool, name, errorval)
#define API_VAR_ALLOC_DONTFAIL(type, pool, name)
#define API_VAR_FREE(pool, name)
#define API_VAR_FREE_POOL(pool, name)
#define API_EXPR_REF(expr) expr