Revert syntactic/style changes

So actual changes aren't obfuscated
This commit is contained in:
Willem Toorop 2015-12-17 12:37:33 +01:00
parent 0d6d8116bc
commit a2e15a169d
3 changed files with 54 additions and 58 deletions

View File

@ -429,8 +429,6 @@ case "$enable_stub_only" in
;;
esac
# search to set include and library paths right
# find libidn
my_with_libidn=1

View File

@ -1793,7 +1793,7 @@ getdns_context_set_dnssec_allowed_skew(struct getdns_context *context,
*/
getdns_return_t
getdns_context_set_upstream_recursive_servers(struct getdns_context *context,
struct getdns_list *upstream_list)
struct getdns_list *upstream_list)
{
getdns_return_t r;
size_t count = 0;
@ -1834,7 +1834,7 @@ struct getdns_list *upstream_list)
goto error;
if ((r = getdns_dict_get_bindata(
dict, "address_type", &address_type)))
dict, "address_type",&address_type)))
goto error;
if (address_type->size < 4)
goto invalid_parameter;
@ -1862,7 +1862,7 @@ struct getdns_list *upstream_list)
goto invalid_parameter;
eos = &addrstr[strlen(addrstr)];
*eos++ = '%';
(void)memcpy(eos, scope_id->data, scope_id->size);
(void) memcpy(eos, scope_id->data, scope_id->size);
eos[scope_id->size] = 0;
}
@ -1875,10 +1875,10 @@ struct getdns_list *upstream_list)
continue;
if (getdns_upstream_transports[j] != GETDNS_TRANSPORT_TLS)
(void)getdns_dict_get_int(dict, "port", &port);
(void) getdns_dict_get_int(dict, "port", &port);
else
(void)getdns_dict_get_int(dict, "tls_port", &port);
(void)snprintf(portstr, 1024, "%d", (int)port);
(void) getdns_dict_get_int(dict, "tls_port", &port);
(void) snprintf(portstr, 1024, "%d", (int)port);
if (getaddrinfo(addrstr, portstr, &hints, &ai))
goto invalid_parameter;
@ -1920,7 +1920,8 @@ invalid_parameter:
error:
_getdns_upstreams_dereference(upstreams);
return GETDNS_RETURN_CONTEXT_UPDATE_FAIL;
}
} /* getdns_context_set_upstream_recursive_servers */
static void
set_ub_edns_maximum_udp_payload_size(struct getdns_context* context,
@ -2355,7 +2356,7 @@ _getdns_context_prepare_for_resolution(struct getdns_context *context,
#ifdef HAVE_TLS_v1_2
/* Create client context, use TLS v1.2 only for now */
context->tls_ctx = SSL_CTX_new(TLSv1_2_client_method());
if (context->tls_ctx == NULL)
if(context->tls_ctx == NULL)
#ifndef USE_WINSOCK
return GETDNS_RETURN_BAD_CONTEXT;
#else
@ -2364,16 +2365,13 @@ _getdns_context_prepare_for_resolution(struct getdns_context *context,
/* Be strict and only use the cipher suites recommended in RFC7525
Unless we later fallback to opportunistic. */
const char* const PREFERRED_CIPHERS = "EECDH+aRSA+AESGCM:EECDH+aECDSA+AESGCM:EDH+aRSA+AESGCM";
if (!SSL_CTX_set_cipher_list(context->tls_ctx, PREFERRED_CIPHERS)) {
if (!SSL_CTX_set_cipher_list(context->tls_ctx, PREFERRED_CIPHERS))
return GETDNS_RETURN_BAD_CONTEXT;
}
if (!SSL_CTX_set_default_verify_paths(context->tls_ctx)) {
if (!SSL_CTX_set_default_verify_paths(context->tls_ctx))
return GETDNS_RETURN_BAD_CONTEXT;
}
#else
if (tls_only_is_in_transports_list(context) == 1) {
if (tls_only_is_in_transports_list(context) == 1)
return GETDNS_RETURN_BAD_CONTEXT;
}
/* A null tls_ctx will make TLS fail and fallback to the other
transports will kick-in.*/
#endif

View File

@ -1374,7 +1374,7 @@ stub_tcp_read_cb(void *userarg)
int q;
switch ((q = stub_tcp_read(netreq->fd, &netreq->tcp,
&dnsreq->context->mf, &netreq->event))) {
&dnsreq->context->mf))) {
case STUB_TCP_AGAIN:
return;
@ -1452,7 +1452,7 @@ upstream_read_cb(void *userarg)
&upstream->upstreams->mf);
else
q = stub_tcp_read(upstream->fd, &upstream->tcp,
&upstream->upstreams->mf, &netreq->event);
&upstream->upstreams->mf);
switch (q) {
case STUB_TCP_AGAIN: