From: Nick Mathewson Date: Thu, 9 Dec 2010 16:43:12 +0000 (-0500) Subject: Remove end-of-line whitespace X-Git-Tag: release-2.0.10-stable~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22f4af6580bb330c073350580fc7e49d1051a8cf;p=libevent Remove end-of-line whitespace --- diff --git a/evutil.c b/evutil.c index c326e5be..b769acc2 100644 --- a/evutil.c +++ b/evutil.c @@ -1485,11 +1485,11 @@ evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap) r = _vscprintf(format, ap); #elif defined(sgi) /* Make sure we always use the correct vsnprintf on IRIX */ - extern int _xpg5_vsnprintf(char * __restrict, - __SGI_LIBC_NAMESPACE_QUALIFIER size_t, + extern int _xpg5_vsnprintf(char * __restrict, + __SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char * __restrict, /* va_list */ char *); - - r = _xpg5_vsnprintf(buf, buflen, format, ap); + + r = _xpg5_vsnprintf(buf, buflen, format, ap); #else r = vsnprintf(buf, buflen, format, ap); #endif diff --git a/http.c b/http.c index f56d6368..643bde27 100644 --- a/http.c +++ b/http.c @@ -1834,7 +1834,7 @@ evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req) } /* Should we send a 100 Continue status line? */ - if (req->kind == EVHTTP_REQUEST && REQ_VERSION_ATLEAST(req, 1, 1)) { + if (req->kind == EVHTTP_REQUEST && REQ_VERSION_ATLEAST(req, 1, 1)) { const char *expect; expect = evhttp_find_header(req->input_headers, "Expect"); @@ -2750,7 +2750,7 @@ evhttp_dispatch_callback(struct httpcbq *callbacks, struct evhttp_request *req) size_t offset = 0; char *translated; const char *path; - + /* Test for different URLs */ path = evhttp_uri_get_path(req->uri_elems); offset = strlen(path); @@ -3226,10 +3226,10 @@ evhttp_remove_server_alias(struct evhttp *http, const char *alias) mm_free(evalias->alias); mm_free(evalias); return 0; - } + } } - return -1; + return -1; } void @@ -3386,7 +3386,7 @@ evhttp_request_free(struct evhttp_request *req) mm_free(req->response_code_line); if (req->host_cache != NULL) mm_free(req->host_cache); - + evhttp_clear_headers(req->input_headers); mm_free(req->input_headers); @@ -3465,7 +3465,7 @@ evhttp_request_get_host(struct evhttp_request *req) if (!host && req->input_headers) { const char *p; size_t len; - + 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. */ @@ -3486,7 +3486,7 @@ evhttp_request_get_host(struct evhttp_request *req) } } } - + return host; } @@ -3589,7 +3589,7 @@ evhttp_associate_new_request_with_connection(struct evhttp_connection *evcon) req->flags |= EVHTTP_REQ_OWN_CONNECTION; /* We did not present the request to the user user yet, so treat it as - * if the user was done with the request. This allows us to free the + * if the user was done with the request. This allows us to free the * request on a persistent connection if the client drops it without * sending a request. */ diff --git a/include/event2/http.h b/include/event2/http.h index 69f32ef8..e05c3bff 100644 --- a/include/event2/http.h +++ b/include/event2/http.h @@ -267,20 +267,20 @@ int evhttp_remove_virtual_host(struct evhttp* http, struct evhttp* vhost); /** Add a server alias to an http object. The http object can be a virtual - host or the main server. + host or the main server. @param http the evhttp object @param alias the alias to add - @see evhttp_add_remove_alias() + @see evhttp_add_remove_alias() */ int evhttp_add_server_alias(struct evhttp *http, const char *alias); /** Remove a server alias from an http object. - + @param http the evhttp object @param alias the alias to remove - @see evhttp_add_server_alias() + @see evhttp_add_server_alias() */ int evhttp_remove_server_alias(struct evhttp *http, const char *alias); diff --git a/sample/http-server.c b/sample/http-server.c index 63e434d0..f9e84d1c 100644 --- a/sample/http-server.c +++ b/sample/http-server.c @@ -217,7 +217,7 @@ send_document_cb(struct evhttp_request *req, void *arg) pattern[dirlen+2] = '\0'; d = FindFirstFileA(pattern, &ent); free(pattern); - if (d == INVALID_HANDLE_VALUE) + if (d == INVALID_HANDLE_VALUE) goto err; #else if (!(d = opendir(whole_path))) diff --git a/test/regress.c b/test/regress.c index 64659334..ee6962fc 100644 --- a/test/regress.c +++ b/test/regress.c @@ -1422,7 +1422,7 @@ static void test_nonpersist_readd(void) { struct event ev1, ev2; - + setup_test("Re-add nonpersistent events: "); event_set(&ev1, pair[0], EV_READ, re_add_read_cb, &ev2); event_set(&ev2, pair[1], EV_READ, re_add_read_cb, &ev1); diff --git a/test/regress_http.c b/test/regress_http.c index 349dbee2..99e9f938 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -3348,7 +3348,7 @@ http_data_length_constraints_test(void *arg) tt_abort_msg("Couldn't make request"); } event_base_dispatch(data->base); - + test_ok = 1; end: if (evcon)