Add internal M_UNLIKELY_NOMEM to help coverage computation
This commit is contained in:
1 parent
6976d4e23d
commit
7534aa0d61
18 files changed
+72
-64
No files matched your search
@@ -175,7 +175,7 @@
|
||||
{ \
|
||||
size_t def = d->default_size; \
|
||||
/* Test for overflow of the size computation */ \
|
||||
if (M_UNLIKELY (def > SIZE_MAX / sizeof (type) - sizeof(node_t))) { \
|
||||
if (M_UNLIKELY_NOMEM (def > SIZE_MAX / sizeof (type) - sizeof(node_t))) { \
|
||||
M_MEMORY_FULL(sizeof(node_t)+def * sizeof(type)); \
|
||||
return NULL; \
|
||||
} \
|
||||
@@ -183,7 +183,7 @@
|
||||
node_t*n = (node_t*) (void*) \
|
||||
M_CALL_REALLOC(oplist, char, NULL, \
|
||||
sizeof(node_t) + def * sizeof(type) ); \
|
||||
if (n==NULL) { \
|
||||
if (M_UNLIKELY_NOMEM (n==NULL)) { \
|
||||
M_MEMORY_FULL(sizeof(node_t)+def * sizeof(type)); \
|
||||
return NULL; \
|
||||
} \
|
||||
|
||||
Reference in new issue
Block a user