Removed trailing spaces

This commit is contained in:
Tatsuhiro Tsujikawa 2012-10-01 21:51:24 +09:00
parent 9d6257a4cc
commit e69947a054
11 changed files with 19 additions and 20 deletions

View File

@ -576,7 +576,7 @@ static void fetch_uri(const struct URI *uri)
{ {
spdylay_session_callbacks callbacks; spdylay_session_callbacks callbacks;
int fd; int fd;
SSL_CTX *ssl_ctx; SSL_CTX *ssl_ctx;
SSL *ssl; SSL *ssl;
struct Request req; struct Request req;
struct Connection connection; struct Connection connection;
@ -610,14 +610,14 @@ static void fetch_uri(const struct URI *uri)
/* Here make file descriptor non-block */ /* Here make file descriptor non-block */
make_non_block(fd); make_non_block(fd);
set_tcp_nodelay(fd); set_tcp_nodelay(fd);
printf("[INFO] SPDY protocol version = %d\n", spdy_proto_version); printf("[INFO] SPDY protocol version = %d\n", spdy_proto_version);
rv = spdylay_session_client_new(&connection.session, spdy_proto_version, rv = spdylay_session_client_new(&connection.session, spdy_proto_version,
&callbacks, &connection); &callbacks, &connection);
if(rv != 0) { if(rv != 0) {
diec("spdylay_session_client_new", rv); diec("spdylay_session_client_new", rv);
} }
/* Submit the HTTP request to the outbound queue. */ /* Submit the HTTP request to the outbound queue. */
submit_request(&connection, &req); submit_request(&connection, &req);

View File

@ -45,7 +45,7 @@ EventPoll::~EventPoll()
} }
delete [] evlist_; delete [] evlist_;
} }
int EventPoll::poll(int timeout) int EventPoll::poll(int timeout)
{ {
num_events_ = 0; num_events_ = 0;

View File

@ -189,7 +189,7 @@ SpdyEventHandler::SpdyEventHandler(const Config* config,
&entry, 1); &entry, 1);
assert(r == 0); assert(r == 0);
} }
SpdyEventHandler::~SpdyEventHandler() SpdyEventHandler::~SpdyEventHandler()
{ {
on_session_closed(this, session_id_); on_session_closed(this, session_id_);
@ -756,7 +756,7 @@ private:
sessions->add_handler(hd); sessions->add_handler(hd);
} }
} }
int fd_; int fd_;
SSL *ssl_; SSL *ssl_;
uint16_t version_; uint16_t version_;

View File

@ -70,7 +70,7 @@ int DownstreamConnection::attach_downstream(Downstream *downstream)
event_base *evbase = client_handler_->get_evbase(); event_base *evbase = client_handler_->get_evbase();
bev_ = bufferevent_socket_new bev_ = bufferevent_socket_new
(evbase, -1, (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 int rv = bufferevent_socket_connect
(bev_, (bev_,
// TODO maybe not thread-safe? // TODO maybe not thread-safe?

View File

@ -40,7 +40,7 @@ struct WorkerEvent {
sockaddr_union client_addr; sockaddr_union client_addr;
size_t client_addrlen; size_t client_addrlen;
}; };
class ThreadEventReceiver { class ThreadEventReceiver {
public: public:
ThreadEventReceiver(SSL_CTX *ssl_ctx); ThreadEventReceiver(SSL_CTX *ssl_ctx);

View File

@ -40,7 +40,7 @@ Worker::Worker(WorkerInfo *info)
: fd_(info->sv[1]), : fd_(info->sv[1]),
ssl_ctx_(info->ssl_ctx) ssl_ctx_(info->ssl_ctx)
{} {}
Worker::~Worker() Worker::~Worker()
{ {
shutdown(fd_, SHUT_WR); shutdown(fd_, SHUT_WR);

View File

@ -440,15 +440,15 @@ static void run_spdylay_frame_pack_syn_stream(void)
goto fail; goto fail;
} }
spdylay_frame_syn_stream_free(&oframe.syn_stream); spdylay_frame_syn_stream_free(&oframe.syn_stream);
fail: fail:
free(buf); free(buf);
free(nvbuf); free(nvbuf);
spdylay_frame_syn_stream_free(&frame.syn_stream); spdylay_frame_syn_stream_free(&frame.syn_stream);
nv_copy_fail: nv_copy_fail:
spdylay_zlib_inflate_free(&inflater); spdylay_zlib_inflate_free(&inflater);
inflate_init_fail: inflate_init_fail:
spdylay_zlib_deflate_free(&deflater); spdylay_zlib_deflate_free(&deflater);
deflate_init_fail: deflate_init_fail:
spdylay_buffer_free(&inflatebuf); spdylay_buffer_free(&inflatebuf);
} }

View File

@ -51,7 +51,7 @@ void test_spdylay_buffer(void)
memcpy(spdylay_buffer_get(&buffer), "34567", 5); memcpy(spdylay_buffer_get(&buffer), "34567", 5);
spdylay_buffer_advance(&buffer, 5); spdylay_buffer_advance(&buffer, 5);
CU_ASSERT(8 == spdylay_buffer_length(&buffer)); CU_ASSERT(8 == spdylay_buffer_length(&buffer));
CU_ASSERT(0 == spdylay_buffer_avail(&buffer)); CU_ASSERT(0 == spdylay_buffer_avail(&buffer));
CU_ASSERT(0 == spdylay_buffer_alloc(&buffer)); CU_ASSERT(0 == spdylay_buffer_alloc(&buffer));
memcpy(spdylay_buffer_get(&buffer), "89ABCDE", 7); 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(15 == spdylay_buffer_length(&buffer));
CU_ASSERT(1 == spdylay_buffer_avail(&buffer)); CU_ASSERT(1 == spdylay_buffer_avail(&buffer));
spdylay_buffer_serialize(&buffer, out); spdylay_buffer_serialize(&buffer, out);
CU_ASSERT(0 == memcmp("0123456789ABCDE", out, 15)); CU_ASSERT(0 == memcmp("0123456789ABCDE", out, 15));

View File

@ -90,7 +90,7 @@ void test_spdylay_client_cert_vector_resize(void)
spdylay_client_cert_vector_put(&certvec, origin); spdylay_client_cert_vector_put(&certvec, origin);
origin = create_origin("https", "example.com", 443); origin = create_origin("https", "example.com", 443);
spdylay_client_cert_vector_put(&certvec, origin); spdylay_client_cert_vector_put(&certvec, origin);
CU_ASSERT(0 == spdylay_client_cert_vector_resize(&certvec, 1)); CU_ASSERT(0 == spdylay_client_cert_vector_resize(&certvec, 1));
CU_ASSERT(NULL != spdylay_client_cert_vector_get_origin(&certvec, 1)); CU_ASSERT(NULL != spdylay_client_cert_vector_get_origin(&certvec, 1));
CU_ASSERT(1 == certvec.last_slot); CU_ASSERT(1 == certvec.last_slot);

View File

@ -34,8 +34,7 @@
#include "spdylay_gzip.h" #include "spdylay_gzip.h"
static ssize_t deflate_data(uint8_t *out, size_t outlen, static ssize_t deflate_data(uint8_t *out, size_t outlen,
const const uint8_t *in, size_t inlen)
uint8_t *in, size_t inlen)
{ {
int rv; int rv;
z_stream zst; z_stream zst;
@ -46,7 +45,7 @@ uint8_t *in, size_t inlen)
rv = deflateInit(&zst, Z_DEFAULT_COMPRESSION); rv = deflateInit(&zst, Z_DEFAULT_COMPRESSION);
assert(rv == Z_OK); assert(rv == Z_OK);
zst.avail_in = inlen; zst.avail_in = inlen;
zst.next_in = (uint8_t*)in; zst.next_in = (uint8_t*)in;
zst.avail_out = outlen; zst.avail_out = outlen;
@ -110,7 +109,7 @@ void test_spdylay_gzip_inflate(void)
CU_ASSERT(sizeof(input)-49 == outproclen); CU_ASSERT(sizeof(input)-49 == outproclen);
CU_ASSERT(inproclen > 0); CU_ASSERT(inproclen > 0);
CU_ASSERT(0 == memcmp(inputptr, out, outproclen)); CU_ASSERT(0 == memcmp(inputptr, out, outproclen));
inlen -= inproclen; inlen -= inproclen;
CU_ASSERT(0 == inlen); CU_ASSERT(0 == inlen);

View File

@ -50,7 +50,7 @@ void test_spdylay_pq(void)
CU_ASSERT(strcmp("bar", spdylay_pq_top(&pq)) == 0); CU_ASSERT(strcmp("bar", spdylay_pq_top(&pq)) == 0);
CU_ASSERT(0 == spdylay_pq_push(&pq, (void*)"C")); CU_ASSERT(0 == spdylay_pq_push(&pq, (void*)"C"));
CU_ASSERT(4 == spdylay_pq_size(&pq)); 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); spdylay_pq_pop(&pq);
CU_ASSERT(3 == spdylay_pq_size(&pq)); CU_ASSERT(3 == spdylay_pq_size(&pq));
CU_ASSERT(strcmp("bar", spdylay_pq_top(&pq)) == 0); CU_ASSERT(strcmp("bar", spdylay_pq_top(&pq)) == 0);