small cosmetic changes in hash tables (initialization of next pointer)
This commit is contained in:
parent
e75bb8874f
commit
e4d9594065
|
|
@ -84,8 +84,8 @@ static Hilight_hashentry *hilight_hash_lookup(const char *token, int value, int
|
|||
if(token==NULL) return NULL;
|
||||
hashcode=hi_hash(token);
|
||||
index=hashcode % HASHSIZE;
|
||||
entry=xctx->hilight_table[index];
|
||||
preventry=&xctx->hilight_table[index];
|
||||
entry=*preventry;
|
||||
while(1) {
|
||||
if( !entry ) { /* empty slot */
|
||||
size_t lent = strlen(token) + 1;
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ static Node_hashentry *node_hash_lookup(const char *token, const char *dir,int w
|
|||
d.port=port;
|
||||
hashcode=str_hash(token);
|
||||
index=hashcode % HASHSIZE;
|
||||
entry=xctx->node_table[index];
|
||||
preventry=&xctx->node_table[index];
|
||||
entry=*preventry;
|
||||
while(1)
|
||||
{
|
||||
if( !entry ) /* empty slot */
|
||||
|
|
|
|||
|
|
@ -720,8 +720,8 @@ Str_hashentry *str_hash_lookup(Str_hashtable *hashtable, const char *token, cons
|
|||
if(token==NULL || size == 0 || table == NULL) return NULL;
|
||||
hashcode=str_hash(token);
|
||||
idx=hashcode % size;
|
||||
entry=table[idx];
|
||||
preventry=&table[idx];
|
||||
entry=*preventry;
|
||||
while(1)
|
||||
{
|
||||
if( !entry ) /* empty slot */
|
||||
|
|
@ -821,8 +821,8 @@ Int_hashentry *int_hash_lookup(Int_hashtable *hashtable, const char *token, cons
|
|||
if(token==NULL || size == 0 || table == NULL) return NULL;
|
||||
hashcode=str_hash(token);
|
||||
idx=hashcode % size;
|
||||
entry=table[idx];
|
||||
preventry=&table[idx];
|
||||
entry=*preventry;
|
||||
while(1)
|
||||
{
|
||||
if( !entry ) /* empty slot */
|
||||
|
|
@ -921,8 +921,8 @@ Ptr_hashentry *ptr_hash_lookup(Ptr_hashtable *hashtable, const char *token, void
|
|||
if(token==NULL || size == 0 || table == NULL) return NULL;
|
||||
hashcode=str_hash(token);
|
||||
idx=hashcode % size;
|
||||
entry=table[idx];
|
||||
preventry=&table[idx];
|
||||
entry=*preventry;
|
||||
while(1)
|
||||
{
|
||||
if( !entry ) /* empty slot */
|
||||
|
|
|
|||
Loading…
Reference in New Issue