** If zKey/nKey is present in the hash table, return a pointer to the ** hash-entry object. */
| 10465 | ** hash-entry object. |
| 10466 | */ |
| 10467 | static IdxHashEntry *idxHashFind(IdxHash *pHash, const char *zKey, int nKey){ |
| 10468 | int iHash; |
| 10469 | IdxHashEntry *pEntry; |
| 10470 | if( nKey<0 ) nKey = STRLEN(zKey); |
| 10471 | iHash = idxHashString(zKey, nKey); |
| 10472 | assert( iHash>=0 ); |
| 10473 | for(pEntry=pHash->aHash[iHash]; pEntry; pEntry=pEntry->pHashNext){ |
| 10474 | if( STRLEN(pEntry->zKey)==nKey && 0==memcmp(pEntry->zKey, zKey, nKey) ){ |
| 10475 | return pEntry; |
| 10476 | } |
| 10477 | } |
| 10478 | return 0; |
| 10479 | } |
| 10480 | |
| 10481 | /* |
| 10482 | ** If the hash table contains an entry with a key equal to the string |
no test coverage detected