line |
true |
false |
branch |
28
|
27 |
3601 |
if (!size) { |
30
|
0 |
27 |
if (git__page_size(&page_size) < 0) |
42
|
0 |
3628 |
assert(pool); |
43
|
0 |
3628 |
assert(item_size >= 1); |
54
|
1297 |
4124 |
for (scan = pool->pages; scan != NULL; scan = next) { |
68
|
0 |
1297 |
if (GIT_ADD_SIZET_OVERFLOW(&alloc_size, new_page_size, sizeof(git_pool_page)) || |
|
0 |
1297 |
if (GIT_ADD_SIZET_OVERFLOW(&alloc_size, new_page_size, sizeof(git_pool_page)) || |
86
|
2777 |
1297 |
if (!page || page->avail < size) |
|
0 |
2777 |
if (!page || page->avail < size) |
99
|
0 |
0 |
for (scan = pool->pages; scan != NULL; scan = scan->next) ct++; |
106
|
0 |
0 |
for (scan = pool->pages; scan != NULL; scan = scan->next) |
107
|
0 |
0 |
if ((void *)scan->data <= ptr && |
|
0 |
0 |
if ((void *)scan->data <= ptr && |
164
|
0 |
4 |
if (a == b) |
176
|
1202 |
2872 |
if (pool->item_size > 1) { |
193
|
500 |
0 |
if (ptr) |
202
|
1404 |
0 |
assert(pool && str && pool->item_size == sizeof(char)); |
|
1404 |
0 |
assert(pool && str && pool->item_size == sizeof(char)); |
|
0 |
1404 |
assert(pool && str && pool->item_size == sizeof(char)); |
204
|
0 |
1404 |
if (n == SIZE_MAX) |
207
|
1404 |
0 |
if ((ptr = git_pool_malloc(pool, (n + 1))) != NULL) { |
217
|
610 |
0 |
assert(pool && str && pool->item_size == sizeof(char)); |
|
610 |
0 |
assert(pool && str && pool->item_size == sizeof(char)); |
|
0 |
610 |
assert(pool && str && pool->item_size == sizeof(char)); |
223
|
8 |
0 |
return str ? git_pool_strdup(pool, str) : NULL; |
231
|
6 |
0 |
assert(pool && pool->item_size == sizeof(char)); |
|
0 |
6 |
assert(pool && pool->item_size == sizeof(char)); |
233
|
6 |
0 |
len_a = a ? strlen(a) : 0; |
234
|
6 |
0 |
len_b = b ? strlen(b) : 0; |
236
|
0 |
6 |
if (GIT_ADD_SIZET_OVERFLOW(&total, len_a, len_b) || |
|
0 |
6 |
if (GIT_ADD_SIZET_OVERFLOW(&total, len_a, len_b) || |
240
|
6 |
0 |
if ((ptr = git_pool_malloc(pool, total)) != NULL) { |
241
|
6 |
0 |
if (len_a) |
243
|
6 |
0 |
if (len_b) |