Skip to content

Commit

Permalink
Update address_cache.c
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Jun 10, 2023
1 parent 419e219 commit dbbea4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/address_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef struct addrinfo_key_t {
} addrinfo_key_t;

static inline bool hash_cmp_addrinfo_key_t(const addrinfo_key_t *a, const addrinfo_key_t *b, size_t size) {
return a->socktype == b->socktype && strcmp(a->address, b->address) == 0 && strcmp(a->service, b->service) == 0;
return a->socktype != b->socktype || strcmp(a->address, b->address) != 0 || strcmp(a->service, b->service) != 0;
}


Expand Down Expand Up @@ -74,7 +74,7 @@ static uint32_t hash_function_addrinfo_key_t(const addrinfo_key_t* key) {
hash_define(addrinfo_key_t, resolving_SIZE)
hash_new(addrinfo_key_t, resolving);

void *getaddrinfo_thread(void *arg) {
static void *getaddrinfo_thread(void *arg) {
struct addrinfo_result_t *result = (struct addrinfo_result_t *)arg;

struct addrinfo *ai, hint = {0};
Expand Down

0 comments on commit dbbea4f

Please sign in to comment.