line |
true |
false |
branch |
60
|
0 |
0 |
if ( freeListIdx >= FreeListSz ) { |
64
|
0 |
0 |
if ( !(FreeList = (bpc_hashtable_key**)realloc(FreeList, 2 * freeListIdx * sizeof(bpc_hashtable_key*))) ) { |
71
|
0 |
0 |
if ( !FreeList[freeListIdx] ) { |
77
|
0 |
0 |
if ( !(newBuf = (char*)malloc(size * FREELIST_ALLOC_CNT)) ) { |
86
|
0 |
0 |
for ( i = 0 ; i < FREELIST_ALLOC_CNT - 1 ; i++ ) { |
124
|
0 |
0 |
if ( (size & (size-1)) || size < 16 ) { |
|
0 |
0 |
if ( (size & (size-1)) || size < 16 ) { |
127
|
0 |
0 |
while ( size < req ) { |
131
|
0 |
0 |
if ( !(tbl->nodes = calloc(size, sizeof(tbl->nodes[0]))) ) { |
146
|
0 |
0 |
for ( i = 0 ; i < tbl->size ; i++ ) { |
147
|
0 |
0 |
if ( tbl->nodes[i] ) { |
157
|
0 |
0 |
for ( i = 0 ; i < tbl->size ; i++ ) { |
158
|
0 |
0 |
if ( tbl->nodes[i] ) { |
178
|
0 |
0 |
for ( ndx = 0 ; keyLen > 0 ; keyLen-- ) { |
231
|
0 |
0 |
if ( (newSize & (newSize-1)) || newSize < 16 ) { |
|
0 |
0 |
if ( (newSize & (newSize-1)) || newSize < 16 ) { |
234
|
0 |
0 |
while ( newSize < req ) { |
238
|
0 |
0 |
if ( tbl->size >= newSize ) return; |
239
|
0 |
0 |
if ( !(tbl->nodes = (bpc_hashtable_key**)calloc(newSize, sizeof(tbl->nodes[0]))) ) { |
247
|
0 |
0 |
for ( i = 0 ; i < oldSize ; i++, old_node++ ) { |
251
|
0 |
0 |
if ( !keyInfo ) continue; |
254
|
0 |
0 |
if ( !keyInfo->key && keyInfo->keyLen == 1 ) { |
|
0 |
0 |
if ( !keyInfo->key && keyInfo->keyLen == 1 ) { |
259
|
0 |
0 |
for ( j = 0 ; j < tbl->size ; j++, ndx++ ) { |
260
|
0 |
0 |
if ( ndx >= tbl->size ) ndx = 0; |
261
|
0 |
0 |
if ( tbl->nodes[ndx] ) continue; |
266
|
0 |
0 |
if ( j >= tbl->size ) { |
283
|
0 |
0 |
if ( allocate_if_missing && tbl->entries + tbl->entriesDel > HASH_LOAD_LIMIT(tbl->size) ) { |
|
0 |
0 |
if ( allocate_if_missing && tbl->entries + tbl->entriesDel > HASH_LOAD_LIMIT(tbl->size) ) { |
295
|
0 |
0 |
for ( i = 0 ; i < tbl->size ; i++ ) { |
298
|
0 |
0 |
if ( !keyInfo ) { |
303
|
0 |
0 |
if ( allocate_if_missing ) { |
305
|
0 |
0 |
if ( keyDeleted ) { |
318
|
0 |
0 |
if ( !key ) { |
325
|
0 |
0 |
if ( !keyInfo->key && keyInfo->keyLen == 1 ) { |
|
0 |
0 |
if ( !keyInfo->key && keyInfo->keyLen == 1 ) { |
326
|
0 |
0 |
if ( !keyDeleted ) { |
333
|
0 |
0 |
} else if ( keyInfo->keyHash == keyHash && keyInfo->keyLen == keyLen && !memcmp(key, keyInfo->key, keyLen) ) { |
|
0 |
0 |
} else if ( keyInfo->keyHash == keyHash && keyInfo->keyLen == keyLen && !memcmp(key, keyInfo->key, keyLen) ) { |
|
0 |
0 |
} else if ( keyInfo->keyHash == keyHash && keyInfo->keyLen == keyLen && !memcmp(key, keyInfo->key, keyLen) ) { |
338
|
0 |
0 |
if ( ndx >= tbl->size ) ndx = 0; |
378
|
0 |
0 |
for ( i = 0 ; i < tbl->size ; i++ ) { |
381
|
0 |
0 |
if ( !keyInfo ) continue; |
382
|
0 |
0 |
if ( !keyInfo->key ) { |
383
|
0 |
0 |
if ( keyInfo->keyLen == 1 ) entriesDel++; |
387
|
0 |
0 |
if ( !keyInfo->key ) { |
388
|
0 |
0 |
if ( keyInfo->keyLen == 1 ) entriesDel++; |
394
|
0 |
0 |
if ( entries != tbl->entries ) { |
399
|
0 |
0 |
if ( entriesDel != tbl->entriesDel ) { |
422
|
0 |
0 |
for ( ; i < (uint)tbl->size ; i++ ) { |
424
|
0 |
0 |
if ( !keyInfo || !keyInfo->key ) continue; |
|
0 |
0 |
if ( !keyInfo || !keyInfo->key ) continue; |