From e69947a054dcb93cfadd24b41955b26e214f8666 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 1 Oct 2012 21:51:24 +0900 Subject: [PATCH] Removed trailing spaces --- examples/spdycli.c | 6 +++--- src/EventPoll_epoll.cc | 2 +- src/SpdyServer.cc | 4 ++-- src/shrpx_downstream_connection.cc | 2 +- src/shrpx_thread_event_receiver.h | 2 +- src/shrpx_worker.cc | 2 +- tests/failmalloc_test.c | 6 +++--- tests/spdylay_buffer_test.c | 4 ++-- tests/spdylay_client_cert_vector_test.c | 2 +- tests/spdylay_gzip_test.c | 7 +++---- tests/spdylay_pq_test.c | 2 +- 11 files changed, 19 insertions(+), 20 deletions(-) diff --git a/examples/spdycli.c b/examples/spdycli.c index f9e2d755..d2815ae6 100644 --- a/examples/spdycli.c +++ b/examples/spdycli.c @@ -576,7 +576,7 @@ static void fetch_uri(const struct URI *uri) { spdylay_session_callbacks callbacks; int fd; - SSL_CTX *ssl_ctx; + SSL_CTX *ssl_ctx; SSL *ssl; struct Request req; struct Connection connection; @@ -610,14 +610,14 @@ static void fetch_uri(const struct URI *uri) /* Here make file descriptor non-block */ make_non_block(fd); set_tcp_nodelay(fd); - + printf("[INFO] SPDY protocol version = %d\n", spdy_proto_version); rv = spdylay_session_client_new(&connection.session, spdy_proto_version, &callbacks, &connection); if(rv != 0) { diec("spdylay_session_client_new", rv); } - + /* Submit the HTTP request to the outbound queue. */ submit_request(&connection, &req); diff --git a/src/EventPoll_epoll.cc b/src/EventPoll_epoll.cc index 2b8f55b8..0a63edfc 100644 --- a/src/EventPoll_epoll.cc +++ b/src/EventPoll_epoll.cc @@ -45,7 +45,7 @@ EventPoll::~EventPoll() } delete [] evlist_; } - + int EventPoll::poll(int timeout) { num_events_ = 0; diff --git a/src/SpdyServer.cc b/src/SpdyServer.cc index 58721ca5..46d5779b 100644 --- a/src/SpdyServer.cc +++ b/src/SpdyServer.cc @@ -189,7 +189,7 @@ SpdyEventHandler::SpdyEventHandler(const Config* config, &entry, 1); assert(r == 0); } - + SpdyEventHandler::~SpdyEventHandler() { on_session_closed(this, session_id_); @@ -756,7 +756,7 @@ private: sessions->add_handler(hd); } } - + int fd_; SSL *ssl_; uint16_t version_; diff --git a/src/shrpx_downstream_connection.cc b/src/shrpx_downstream_connection.cc index e1d498c1..ed1c60c7 100644 --- a/src/shrpx_downstream_connection.cc +++ b/src/shrpx_downstream_connection.cc @@ -70,7 +70,7 @@ int DownstreamConnection::attach_downstream(Downstream *downstream) event_base *evbase = client_handler_->get_evbase(); bev_ = bufferevent_socket_new (evbase, -1, - BEV_OPT_CLOSE_ON_FREE | BEV_OPT_DEFER_CALLBACKS); + BEV_OPT_CLOSE_ON_FREE | BEV_OPT_DEFER_CALLBACKS); int rv = bufferevent_socket_connect (bev_, // TODO maybe not thread-safe? diff --git a/src/shrpx_thread_event_receiver.h b/src/shrpx_thread_event_receiver.h index 70116acc..02fc6eef 100644 --- a/src/shrpx_thread_event_receiver.h +++ b/src/shrpx_thread_event_receiver.h @@ -40,7 +40,7 @@ struct WorkerEvent { sockaddr_union client_addr; size_t client_addrlen; }; - + class ThreadEventReceiver { public: ThreadEventReceiver(SSL_CTX *ssl_ctx); diff --git a/src/shrpx_worker.cc b/src/shrpx_worker.cc index b06dae33..b2d4bf91 100644 --- a/src/shrpx_worker.cc +++ b/src/shrpx_worker.cc @@ -40,7 +40,7 @@ Worker::Worker(WorkerInfo *info) : fd_(info->sv[1]), ssl_ctx_(info->ssl_ctx) {} - + Worker::~Worker() { shutdown(fd_, SHUT_WR); diff --git a/tests/failmalloc_test.c b/tests/failmalloc_test.c index 63cf7f1a..8e9abb6c 100644 --- a/tests/failmalloc_test.c +++ b/tests/failmalloc_test.c @@ -440,15 +440,15 @@ static void run_spdylay_frame_pack_syn_stream(void) goto fail; } spdylay_frame_syn_stream_free(&oframe.syn_stream); - fail: + fail: free(buf); free(nvbuf); spdylay_frame_syn_stream_free(&frame.syn_stream); nv_copy_fail: spdylay_zlib_inflate_free(&inflater); inflate_init_fail: - spdylay_zlib_deflate_free(&deflater); - deflate_init_fail: + spdylay_zlib_deflate_free(&deflater); + deflate_init_fail: spdylay_buffer_free(&inflatebuf); } diff --git a/tests/spdylay_buffer_test.c b/tests/spdylay_buffer_test.c index 7906846f..a6179fda 100644 --- a/tests/spdylay_buffer_test.c +++ b/tests/spdylay_buffer_test.c @@ -51,7 +51,7 @@ void test_spdylay_buffer(void) memcpy(spdylay_buffer_get(&buffer), "34567", 5); spdylay_buffer_advance(&buffer, 5); CU_ASSERT(8 == spdylay_buffer_length(&buffer)); - + CU_ASSERT(0 == spdylay_buffer_avail(&buffer)); CU_ASSERT(0 == spdylay_buffer_alloc(&buffer)); memcpy(spdylay_buffer_get(&buffer), "89ABCDE", 7); @@ -59,7 +59,7 @@ void test_spdylay_buffer(void) CU_ASSERT(15 == spdylay_buffer_length(&buffer)); CU_ASSERT(1 == spdylay_buffer_avail(&buffer)); - + spdylay_buffer_serialize(&buffer, out); CU_ASSERT(0 == memcmp("0123456789ABCDE", out, 15)); diff --git a/tests/spdylay_client_cert_vector_test.c b/tests/spdylay_client_cert_vector_test.c index 236d9207..b247f3d6 100644 --- a/tests/spdylay_client_cert_vector_test.c +++ b/tests/spdylay_client_cert_vector_test.c @@ -90,7 +90,7 @@ void test_spdylay_client_cert_vector_resize(void) spdylay_client_cert_vector_put(&certvec, origin); origin = create_origin("https", "example.com", 443); spdylay_client_cert_vector_put(&certvec, origin); - + CU_ASSERT(0 == spdylay_client_cert_vector_resize(&certvec, 1)); CU_ASSERT(NULL != spdylay_client_cert_vector_get_origin(&certvec, 1)); CU_ASSERT(1 == certvec.last_slot); diff --git a/tests/spdylay_gzip_test.c b/tests/spdylay_gzip_test.c index 52760cac..6f32269a 100644 --- a/tests/spdylay_gzip_test.c +++ b/tests/spdylay_gzip_test.c @@ -34,8 +34,7 @@ #include "spdylay_gzip.h" static ssize_t deflate_data(uint8_t *out, size_t outlen, - const -uint8_t *in, size_t inlen) + const uint8_t *in, size_t inlen) { int rv; z_stream zst; @@ -46,7 +45,7 @@ uint8_t *in, size_t inlen) rv = deflateInit(&zst, Z_DEFAULT_COMPRESSION); assert(rv == Z_OK); - + zst.avail_in = inlen; zst.next_in = (uint8_t*)in; zst.avail_out = outlen; @@ -110,7 +109,7 @@ void test_spdylay_gzip_inflate(void) CU_ASSERT(sizeof(input)-49 == outproclen); CU_ASSERT(inproclen > 0); CU_ASSERT(0 == memcmp(inputptr, out, outproclen)); - + inlen -= inproclen; CU_ASSERT(0 == inlen); diff --git a/tests/spdylay_pq_test.c b/tests/spdylay_pq_test.c index e4b8eb7f..7cdba55d 100644 --- a/tests/spdylay_pq_test.c +++ b/tests/spdylay_pq_test.c @@ -50,7 +50,7 @@ void test_spdylay_pq(void) CU_ASSERT(strcmp("bar", spdylay_pq_top(&pq)) == 0); CU_ASSERT(0 == spdylay_pq_push(&pq, (void*)"C")); CU_ASSERT(4 == spdylay_pq_size(&pq)); - CU_ASSERT(strcmp("C", spdylay_pq_top(&pq)) == 0); + CU_ASSERT(strcmp("C", spdylay_pq_top(&pq)) == 0); spdylay_pq_pop(&pq); CU_ASSERT(3 == spdylay_pq_size(&pq)); CU_ASSERT(strcmp("bar", spdylay_pq_top(&pq)) == 0);