lib: fix formatting nits (part 3)

From `lib/h` to `lib/w`.

part 1: 47a1ab2ebe #19764
part 2: 86b346443b #19800

Closes #19811
This commit is contained in:
Viktor Szakats 2025-12-02 07:25:18 +01:00
parent dc8c0d54a5
commit c3b030b860
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
102 changed files with 2001 additions and 2226 deletions

View file

@ -31,17 +31,17 @@
#include "llist.h"
/* Hash function prototype */
typedef size_t (*hash_function) (void *key,
size_t key_length,
size_t slots_num);
typedef size_t (*hash_function)(void *key,
size_t key_length,
size_t slots_num);
/*
Comparator function prototype. Compares two keys.
*/
typedef size_t (*comp_function) (void *key1,
size_t key1_len,
void *key2,
size_t key2_len);
typedef size_t (*comp_function)(void *key1,
size_t key1_len,
void *key2,
size_t key2_len);
typedef void (*Curl_hash_dtor)(void *);
@ -49,10 +49,10 @@ typedef void (*Curl_hash_elem_dtor)(void *key, size_t key_len, void *p);
struct Curl_hash_element {
struct Curl_hash_element *next;
void *ptr;
void *ptr;
Curl_hash_elem_dtor dtor;
size_t key_len;
char key[1]; /* allocated memory following the struct */
char key[1]; /* allocated memory following the struct */
};
struct Curl_hash {
@ -63,7 +63,7 @@ struct Curl_hash {
/* Comparator function to compare keys */
comp_function comp_func;
/* General element construct, unless element itself carries one */
Curl_hash_dtor dtor;
Curl_hash_dtor dtor;
size_t slots;
size_t size;
#ifdef DEBUGBUILD
@ -105,7 +105,6 @@ void Curl_hash_start_iterate(struct Curl_hash *hash,
struct Curl_hash_element *
Curl_hash_next_element(struct Curl_hash_iterator *iter);
void Curl_hash_print(struct Curl_hash *h,
void (*func)(void *));
void Curl_hash_print(struct Curl_hash *h, void (*func)(void *));
#endif /* HEADER_CURL_HASH_H */