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:
Sebastian Hahn 2012-02-14 11:13:06 +01:00
parent a31fb42d2e
commit efcdc930fb

View File

@ -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]; \