clang-format

pull/673/head
Brad House 1 year ago
parent cb9ad0e398
commit c6708cffb8
  1. 3
      src/lib/ares__iface_ips.c
  2. 3
      src/lib/ares__socket.c
  3. 1
      src/lib/ares_process.c
  4. 2
      src/lib/ares_rand.c

@ -201,8 +201,7 @@ static ares_status_t
size_t alloc_size; size_t alloc_size;
alloc_size = ares__round_up_pow2(ips->alloc_size + 1); alloc_size = ares__round_up_pow2(ips->alloc_size + 1);
temp = ares_realloc_zero(ips->ips, temp = ares_realloc_zero(ips->ips, ips->alloc_size * sizeof(*ips->ips),
ips->alloc_size * sizeof(*ips->ips),
alloc_size * sizeof(*ips->ips)); alloc_size * sizeof(*ips->ips));
if (temp == NULL) { if (temp == NULL) {
return ARES_ENOMEM; return ARES_ENOMEM;

@ -254,7 +254,8 @@ ares_status_t ares__open_connection(ares_channel_t *channel,
ares__llist_node_t *node; ares__llist_node_t *node;
int type = is_tcp ? SOCK_STREAM : SOCK_DGRAM; int type = is_tcp ? SOCK_STREAM : SOCK_DGRAM;
#ifdef __OpenBSD__ #ifdef __OpenBSD__
if((is_tcp && server->tcp_port == 53) || (!is_tcp && server->udp_port == 53)) { if ((is_tcp && server->tcp_port == 53) ||
(!is_tcp && server->udp_port == 53)) {
type |= SOCK_DNS; type |= SOCK_DNS;
} }
#endif #endif

@ -755,7 +755,6 @@ static void handle_conn_error(struct server_connection *conn,
/* This will requeue any connections automatically */ /* This will requeue any connections automatically */
ares__close_connection(conn); ares__close_connection(conn);
} }
ares_status_t ares__requeue_query(struct query *query, struct timeval *now) ares_status_t ares__requeue_query(struct query *query, struct timeval *now)

@ -39,7 +39,6 @@ typedef enum {
ARES_RAND_RC4 = 1 << 2, /* Internal RC4 based PRNG */ ARES_RAND_RC4 = 1 << 2, /* Internal RC4 based PRNG */
} ares_rand_backend; } ares_rand_backend;
#define ARES_RC4_KEY_LEN 32 /* 256 bits */ #define ARES_RC4_KEY_LEN 32 /* 256 bits */
typedef struct ares_rand_rc4 { typedef struct ares_rand_rc4 {
@ -138,7 +137,6 @@ static void ares_rc4_prng(ares_rand_rc4 *rc4_state, unsigned char *buf,
rc4_state->j = j; rc4_state->j = j;
} }
struct ares_rand_state { struct ares_rand_state {
ares_rand_backend type; ares_rand_backend type;
ares_rand_backend bad_backends; ares_rand_backend bad_backends;

Loading…
Cancel
Save