mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Make ht.h conform to Tor's code style again
When porting over changes from libevent, a bunch of tabs and a couple of long lines got introduced.
This commit is contained in:
parent
a31fb42d2e
commit
efcdc930fb
@ -119,7 +119,8 @@ ht_string_hash(const char *s)
|
|||||||
|
|
||||||
/* Helper: alias for the bucket containing 'elm'. */
|
/* Helper: alias for the bucket containing 'elm'. */
|
||||||
#define HT_BUCKET_(head, field, elm, hashfn) \
|
#define HT_BUCKET_(head, field, elm, hashfn) \
|
||||||
((head)->hth_table[HT_ELT_HASH_(elm,field,hashfn) % head->hth_table_length])
|
((head)->hth_table[HT_ELT_HASH_(elm,field,hashfn) \
|
||||||
|
% head->hth_table_length])
|
||||||
|
|
||||||
#define HT_FOREACH(x, name, head) \
|
#define HT_FOREACH(x, name, head) \
|
||||||
for ((x) = HT_START(name, head); \
|
for ((x) = HT_START(name, head); \
|
||||||
@ -269,7 +270,8 @@ ht_string_hash(const char *s)
|
|||||||
if ((*elm)->field.hte_next) { \
|
if ((*elm)->field.hte_next) { \
|
||||||
return &(*elm)->field.hte_next; \
|
return &(*elm)->field.hte_next; \
|
||||||
} else { \
|
} else { \
|
||||||
unsigned b = (HT_ELT_HASH_(*elm, field, hashfn) % head->hth_table_length)+1; \
|
unsigned b = (HT_ELT_HASH_(*elm, field, hashfn) \
|
||||||
|
% head->hth_table_length)+1; \
|
||||||
while (b < head->hth_table_length) { \
|
while (b < head->hth_table_length) { \
|
||||||
if (head->hth_table[b]) \
|
if (head->hth_table[b]) \
|
||||||
return &head->hth_table[b]; \
|
return &head->hth_table[b]; \
|
||||||
|
Loading…
Reference in New Issue
Block a user