clang-format

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

@ -201,9 +201,8 @@ static ares_status_t
size_t alloc_size;
alloc_size = ares__round_up_pow2(ips->alloc_size + 1);
temp = ares_realloc_zero(ips->ips,
ips->alloc_size * sizeof(*ips->ips),
alloc_size * sizeof(*ips->ips));
temp = ares_realloc_zero(ips->ips, ips->alloc_size * sizeof(*ips->ips),
alloc_size * sizeof(*ips->ips));
if (temp == NULL) {
return ARES_ENOMEM;
}
@ -509,8 +508,8 @@ done:
#else
static ares_status_t ares__iface_ips_enumerate(ares__iface_ips_t *ips,
const char *name)
static ares_status_t ares__iface_ips_enumerate(ares__iface_ips_t *ips,
const char *name)
{
(void)ips;
(void)name;

@ -254,7 +254,8 @@ ares_status_t ares__open_connection(ares_channel_t *channel,
ares__llist_node_t *node;
int type = is_tcp ? SOCK_STREAM : SOCK_DGRAM;
#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;
}
#endif

@ -364,9 +364,9 @@ void ares__rand_bytes(ares_rand_state *state, unsigned char *buf, size_t len);
unsigned short ares__generate_new_id(ares_rand_state *state);
struct timeval ares__tvnow(void);
void ares__timeval_remaining(struct timeval *remaining,
const struct timeval *now,
const struct timeval *tout);
void ares__timeval_remaining(struct timeval *remaining,
const struct timeval *now,
const struct timeval *tout);
ares_status_t ares__expand_name_validated(const unsigned char *encoded,
const unsigned char *abuf,
size_t alen, char **s, size_t *enclen,

@ -755,7 +755,6 @@ static void handle_conn_error(struct server_connection *conn,
/* This will requeue any connections automatically */
ares__close_connection(conn);
}
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_backend;
#define ARES_RC4_KEY_LEN 32 /* 256 bits */
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;
}
struct ares_rand_state {
ares_rand_backend type;
ares_rand_backend bad_backends;

@ -34,7 +34,7 @@
#include "ares.h"
#include "ares_private.h"
void ares__timeval_remaining(struct timeval *remaining,
void ares__timeval_remaining(struct timeval *remaining,
const struct timeval *now,
const struct timeval *tout)
{

Loading…
Cancel
Save