From: Christophe Jaillet Date: Thu, 17 Dec 2015 20:41:29 +0000 (+0000) Subject: Fix some small style issues (extra blank lines, '{' at the end of function declaration) X-Git-Tag: 2.5.0-alpha~2524 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd98a4aec2ad614c369996bfee02178b309ad5f;p=thirdparty%2Fapache%2Fhttpd.git Fix some small style issues (extra blank lines, '{' at the end of function declaration) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1720647 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http2/h2_conn_io.c b/modules/http2/h2_conn_io.c index bbc15396b72..d0bb7408fe9 100644 --- a/modules/http2/h2_conn_io.c +++ b/modules/http2/h2_conn_io.c @@ -122,7 +122,8 @@ static apr_status_t pass_out(apr_bucket_brigade *bb, void *ctx) /* Bring the current buffer content into the output brigade, appropriately * chunked. */ -static apr_status_t bucketeer_buffer(h2_conn_io *io) { +static apr_status_t bucketeer_buffer(h2_conn_io *io) +{ const char *data = io->buffer; apr_size_t remaining = io->buflen; apr_bucket *b; diff --git a/modules/http2/h2_h2.c b/modules/http2/h2_h2.c index b175413db8c..6a3231dc4ba 100644 --- a/modules/http2/h2_h2.c +++ b/modules/http2/h2_h2.c @@ -699,6 +699,3 @@ static int h2_h2_post_read_req(request_rec *r) } return DECLINED; } - - - diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c index 9f50b8cb8bd..51c898e2362 100644 --- a/modules/http2/h2_mplx.c +++ b/modules/http2/h2_mplx.c @@ -59,7 +59,8 @@ } while(0) -static int is_aborted(h2_mplx *m, apr_status_t *pstatus) { +static int is_aborted(h2_mplx *m, apr_status_t *pstatus) +{ AP_DEBUG_ASSERT(m); if (m->aborted) { *pstatus = APR_ECONNABORTED; @@ -175,7 +176,8 @@ void h2_mplx_release(h2_mplx *m) release(m, 1); } -static void workers_register(h2_mplx *m) { +static void workers_register(h2_mplx *m) +{ /* Initially, there was ref count increase for this as well, but * this is not needed, even harmful. * h2_workers is only a hub for all the h2_worker instances. @@ -190,11 +192,13 @@ static void workers_register(h2_mplx *m) { h2_workers_register(m->workers, m); } -static void workers_unregister(h2_mplx *m) { +static void workers_unregister(h2_mplx *m) +{ h2_workers_unregister(m->workers, m); } -static int io_process_events(h2_mplx *m, h2_io *io) { +static int io_process_events(h2_mplx *m, h2_io *io) +{ if (io->input_consumed && m->input_consumed) { m->input_consumed(m->input_consumed_ctx, io->id, io->input_consumed); @@ -204,7 +208,6 @@ static int io_process_events(h2_mplx *m, h2_io *io) { return 0; } - static void io_destroy(h2_mplx *m, h2_io *io, int events) { apr_pool_t *pool = io->pool; @@ -253,7 +256,8 @@ static int io_stream_done(h2_mplx *m, h2_io *io, int rst_error) } } -static int stream_done_iter(void *ctx, h2_io *io) { +static int stream_done_iter(void *ctx, h2_io *io) +{ return io_stream_done((h2_mplx*)ctx, io, 0); } @@ -685,7 +689,6 @@ apr_status_t h2_mplx_out_open(h2_mplx *m, int stream_id, h2_response *response, return status; } - apr_status_t h2_mplx_out_write(h2_mplx *m, int stream_id, ap_filter_t* f, apr_bucket_brigade *bb, apr_table_t *trailers, diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index 07a22e012d7..f4058b22369 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -1017,7 +1017,8 @@ typedef struct { int resume_count; } resume_ctx; -static int resume_on_data(void *ctx, h2_stream *stream) { +static int resume_on_data(void *ctx, h2_stream *stream) +{ resume_ctx *rctx = (resume_ctx*)ctx; h2_session *session = rctx->session; AP_DEBUG_ASSERT(session); @@ -1040,7 +1041,8 @@ static int resume_on_data(void *ctx, h2_stream *stream) { return 1; } -static int h2_session_resume_streams_with_data(h2_session *session) { +static int h2_session_resume_streams_with_data(h2_session *session) +{ AP_DEBUG_ASSERT(session); if (!h2_stream_set_is_empty(session->streams) && session->mplx && !session->aborted) { @@ -1579,11 +1581,8 @@ apr_status_t h2_session_receive(h2_session *session, return APR_SUCCESS; } - - static apr_status_t h2_session_read(h2_session *session, int block) { - while (1) { apr_status_t status; diff --git a/modules/http2/h2_switch.c b/modules/http2/h2_switch.c index 3b1789a9afa..4885772bd86 100644 --- a/modules/http2/h2_switch.c +++ b/modules/http2/h2_switch.c @@ -182,4 +182,3 @@ void h2_switch_register_hooks(void) ap_hook_protocol_switch(h2_protocol_switch, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_protocol_get(h2_protocol_get, NULL, NULL, APR_HOOK_MIDDLE); } - diff --git a/modules/http2/h2_task.c b/modules/http2/h2_task.c index f4aa068760f..f1b808db07a 100644 --- a/modules/http2/h2_task.c +++ b/modules/http2/h2_task.c @@ -52,7 +52,8 @@ static apr_status_t h2_filter_stream_input(ap_filter_t* filter, apr_bucket_brigade* brigade, ap_input_mode_t mode, apr_read_type_e block, - apr_off_t readbytes) { + apr_off_t readbytes) +{ h2_task *task = filter->ctx; AP_DEBUG_ASSERT(task); if (!task->input) { @@ -63,7 +64,8 @@ static apr_status_t h2_filter_stream_input(ap_filter_t* filter, } static apr_status_t h2_filter_stream_output(ap_filter_t* filter, - apr_bucket_brigade* brigade) { + apr_bucket_brigade* brigade) +{ h2_task *task = filter->ctx; AP_DEBUG_ASSERT(task); if (!task->output) { @@ -73,7 +75,8 @@ static apr_status_t h2_filter_stream_output(ap_filter_t* filter, } static apr_status_t h2_filter_read_response(ap_filter_t* f, - apr_bucket_brigade* bb) { + apr_bucket_brigade* bb) +{ h2_task *task = f->ctx; AP_DEBUG_ASSERT(task); if (!task->output || !task->output->from_h1) { @@ -117,7 +120,6 @@ void h2_task_register_hooks(void) static int h2_task_pre_conn(conn_rec* c, void *arg) { - h2_ctx *ctx; if (!c->master) { @@ -270,8 +272,3 @@ static int h2_task_process_conn(conn_rec* c) } return DECLINED; } - - - - - diff --git a/modules/http2/h2_task_queue.c b/modules/http2/h2_task_queue.c index 23bad194b9e..249307d5bf0 100644 --- a/modules/http2/h2_task_queue.c +++ b/modules/http2/h2_task_queue.c @@ -176,6 +176,3 @@ static int tq_bubble_down(h2_task_queue *q, int i, int bottom, } return i; } - - - diff --git a/modules/http2/h2_util.c b/modules/http2/h2_util.c index 76ecc276420..b211f572c89 100644 --- a/modules/http2/h2_util.c +++ b/modules/http2/h2_util.c @@ -475,7 +475,8 @@ apr_status_t h2_util_copy(apr_bucket_brigade *to, apr_bucket_brigade *from, return status; } -int h2_util_has_flush_or_eos(apr_bucket_brigade *bb) { +int h2_util_has_flush_or_eos(apr_bucket_brigade *bb) +{ apr_bucket *b; for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); diff --git a/modules/http2/h2_workers.c b/modules/http2/h2_workers.c index 9371eebcf2c..191f5a323ef 100644 --- a/modules/http2/h2_workers.c +++ b/modules/http2/h2_workers.c @@ -43,7 +43,8 @@ static int in_list(h2_workers *workers, h2_mplx *m) return 0; } -static void cleanup_zombies(h2_workers *workers, int lock) { +static void cleanup_zombies(h2_workers *workers, int lock) +{ if (lock) { apr_thread_mutex_lock(workers->lock); } @@ -59,7 +60,6 @@ static void cleanup_zombies(h2_workers *workers, int lock) { } } - /** * Get the next task for the given worker. Will block until a task arrives * or the max_wait timer expires and more than min workers exist. @@ -216,7 +216,6 @@ static void worker_done(h2_worker *worker, void *ctx) } } - static apr_status_t add_worker(h2_workers *workers) { h2_worker *w = h2_worker_create(workers->next_worker_id++, @@ -232,7 +231,8 @@ static apr_status_t add_worker(h2_workers *workers) return APR_SUCCESS; } -static apr_status_t h2_workers_start(h2_workers *workers) { +static apr_status_t h2_workers_start(h2_workers *workers) +{ apr_status_t status = apr_thread_mutex_lock(workers->lock); if (status == APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, workers->s, @@ -390,4 +390,3 @@ void h2_workers_set_max_idle_secs(h2_workers *workers, int idle_secs) } apr_atomic_set32(&workers->max_idle_secs, idle_secs); } -