From bb0d2b4e85dcb674ecee0e4cb4db18d03f64d4d9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 9 Dec 2010 11:47:54 -0500 Subject: [PATCH] Consistentize tabs --- buffer.c | 2 +- evmap.c | 8 ++++---- http.c | 17 +++++++++-------- include/event2/dns_compat.h | 4 ++-- include/event2/event.h | 7 ++++--- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/buffer.c b/buffer.c index 513f4f84..bf53fae6 100644 --- a/buffer.c +++ b/buffer.c @@ -2140,7 +2140,7 @@ evbuffer_readfile(struct evbuffer *buf, evutil_socket_t fd, ev_ssize_t howmuch) /* XXX we _will_ waste some space here if there is any space left * over on buf->last. */ nchains = evbuffer_reserve_space(buf, howmuch, v, 2); - if (nchains < 1 || nchains > 2) { + if (nchains < 1 || nchains > 2) { result = -1; goto done; } diff --git a/evmap.c b/evmap.c index b14a4683..5521626c 100644 --- a/evmap.c +++ b/evmap.c @@ -704,15 +704,15 @@ event_changelist_del(struct event_base *base, evutil_socket_t fd, short old, sho */ if (events & (EV_READ|EV_SIGNAL)) { - if (!(change->old_events & (EV_READ | EV_SIGNAL)) && - (change->read_change & EV_CHANGE_ADD)) + if (!(change->old_events & (EV_READ | EV_SIGNAL)) && + (change->read_change & EV_CHANGE_ADD)) change->read_change = 0; else change->read_change = EV_CHANGE_DEL; } if (events & EV_WRITE) { - if (!(change->old_events & EV_WRITE) && - (change->write_change & EV_CHANGE_ADD)) + if (!(change->old_events & EV_WRITE) && + (change->write_change & EV_CHANGE_ADD)) change->write_change = 0; else change->write_change = EV_CHANGE_DEL; diff --git a/http.c b/http.c index 643bde27..f8de3b37 100644 --- a/http.c +++ b/http.c @@ -1482,7 +1482,7 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line) scheme = evhttp_uri_get_scheme(req->uri_elems); hostname = evhttp_uri_get_host(req->uri_elems); if (scheme && (!evutil_ascii_strcasecmp(scheme, "http") || - !evutil_ascii_strcasecmp(scheme, "https")) && + !evutil_ascii_strcasecmp(scheme, "https")) && hostname && !evhttp_find_vhost(req->evcon->http_server, NULL, hostname)) req->flags |= EVHTTP_PROXY_REQUEST; @@ -3074,11 +3074,12 @@ evhttp_new_object(void) http->timeout = -1; evhttp_set_max_headers_size(http, EV_SIZE_MAX); evhttp_set_max_body_size(http, EV_SIZE_MAX); - evhttp_set_allowed_methods(http, EVHTTP_REQ_GET | - EVHTTP_REQ_POST | - EVHTTP_REQ_HEAD | - EVHTTP_REQ_PUT | - EVHTTP_REQ_DELETE); + evhttp_set_allowed_methods(http, + EVHTTP_REQ_GET | + EVHTTP_REQ_POST | + EVHTTP_REQ_HEAD | + EVHTTP_REQ_PUT | + EVHTTP_REQ_DELETE); TAILQ_INIT(&http->sockets); TAILQ_INIT(&http->callbacks); @@ -3468,7 +3469,7 @@ evhttp_request_get_host(struct evhttp_request *req) host = evhttp_find_header(req->input_headers, "Host"); /* The Host: header may include a port. Remove it here - to be consistent with uri_elems case above. */ + to be consistent with uri_elems case above. */ if (host) { p = host + strlen(host) - 1; while (p > host && EVUTIL_ISDIGIT(*p)) @@ -4029,7 +4030,7 @@ evhttp_uri_parse(const char *source_uri) URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] - relative-ref = relative-part [ "?" query ] [ "#" fragment ] + relative-ref = relative-part [ "?" query ] [ "#" fragment ] */ diff --git a/include/event2/dns_compat.h b/include/event2/dns_compat.h index 77ce838f..89b06fe6 100644 --- a/include/event2/dns_compat.h +++ b/include/event2/dns_compat.h @@ -271,10 +271,10 @@ int evdns_set_option(const char *option, const char *val, int flags); function is evdns_base_resolv_conf_parse(). @param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC| - DNS_OPTIONS_ALL + DNS_OPTIONS_ALL @param filename the path to the resolv.conf file @return 0 if successful, or various positive error codes if an error - occurred (see above) + occurred (see above) @see resolv.conf(3), evdns_config_windows_nameservers() */ int evdns_resolv_conf_parse(int flags, const char *const filename); diff --git a/include/event2/event.h b/include/event2/event.h index ba21d221..911560db 100644 --- a/include/event2/event.h +++ b/include/event2/event.h @@ -754,9 +754,10 @@ const struct timeval *event_base_init_common_timeout(struct event_base *base, @param realloc_fn A replacement for realloc @param free_fn A replacement for free. **/ -void event_set_mem_functions(void *(*malloc_fn)(size_t sz), - void *(*realloc_fn)(void *ptr, size_t sz), - void (*free_fn)(void *ptr)); +void event_set_mem_functions( + void *(*malloc_fn)(size_t sz), + void *(*realloc_fn)(void *ptr, size_t sz), + void (*free_fn)(void *ptr)); #define EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED #endif