** If zKey/nKey is present in the hash table, return a pointer to the ** hash-entry object. */
| 8622 | ** hash-entry object. |
| 8623 | */ |
| 8624 | static IdxHashEntry *idxHashFind(IdxHash *pHash, const char *zKey, int nKey){ |
| 8625 | int iHash; |
| 8626 | IdxHashEntry *pEntry; |
| 8627 | if( nKey<0 ) nKey = STRLEN(zKey); |
| 8628 | iHash = idxHashString(zKey, nKey); |
| 8629 | assert( iHash>=0 ); |
| 8630 | for(pEntry=pHash->aHash[iHash]; pEntry; pEntry=pEntry->pHashNext){ |
| 8631 | if( STRLEN(pEntry->zKey)==nKey && 0==memcmp(pEntry->zKey, zKey, nKey) ){ |
| 8632 | return pEntry; |
| 8633 | } |
| 8634 | } |
| 8635 | return 0; |
| 8636 | } |
| 8637 | |
| 8638 | /* |
| 8639 | ** If the hash table contains an entry with a key equal to the string |
no test coverage detected