From: Christophe Jaillet Date: Mon, 21 Dec 2015 12:12:45 +0000 (+0000) Subject: Use 'unsigned int' instead of 'int' for bitfields X-Git-Tag: 2.5.0-alpha~2515 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d374f916746e48a371a44e8213e4fab58c3c371;p=thirdparty%2Fapache%2Fhttpd.git Use 'unsigned int' instead of 'int' for bitfields git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721137 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http2/h2_io.h b/modules/http2/h2_io.h index c23fa3b470a..b89f8b87a60 100644 --- a/modules/http2/h2_io.h +++ b/modules/http2/h2_io.h @@ -36,30 +36,30 @@ h2_io_op; typedef struct h2_io h2_io; struct h2_io { - int id; /* stream identifier */ - apr_pool_t *pool; /* stream pool */ + int id; /* stream identifier */ + apr_pool_t *pool; /* stream pool */ apr_bucket_alloc_t *bucket_alloc; - const struct h2_request *request; /* request on this io */ - struct h2_response *response;/* response to request */ - int rst_error; /* h2 related stream abort error */ - - apr_bucket_brigade *bbin; /* input data for stream */ - apr_bucket_brigade *bbout; /* output data from stream */ - apr_bucket_brigade *tmp; /* temporary data for chunking */ - - int orphaned : 1; /* h2_stream is gone for this io */ - int task_done : 1; /* h2_task has finished for this io */ - int request_body : 1; /* iff request has body */ - int eos_in : 1; /* input eos has been seen */ - int eos_in_written : 1; /* input eos has been forwarded */ - int eos_out : 1; /* output eos has been seen */ + const struct h2_request *request;/* request on this io */ + struct h2_response *response; /* response to request */ + int rst_error; /* h2 related stream abort error */ + + apr_bucket_brigade *bbin; /* input data for stream */ + apr_bucket_brigade *bbout; /* output data from stream */ + apr_bucket_brigade *tmp; /* temporary data for chunking */ + + unsigned int orphaned : 1; /* h2_stream is gone for this io */ + unsigned int task_done : 1; /* h2_task has finished for this io */ + unsigned int request_body : 1; /* iff request has body */ + unsigned int eos_in : 1; /* input eos has been seen */ + unsigned int eos_in_written : 1; /* input eos has been forwarded */ + unsigned int eos_out : 1; /* output eos has been seen */ - h2_io_op timed_op; /* which operation is waited on, if any */ + h2_io_op timed_op; /* which operation is waited on, if any */ struct apr_thread_cond_t *timed_cond; /* condition to wait on, maybe NULL */ - apr_time_t timeout_at; /* when IO wait will time out */ + apr_time_t timeout_at; /* when IO wait will time out */ - apr_size_t input_consumed; /* how many bytes have been read */ + apr_size_t input_consumed; /* how many bytes have been read */ int files_handles_owned; }; diff --git a/modules/http2/h2_mplx.h b/modules/http2/h2_mplx.h index 35b63c2a7cc..5e4831c3f67 100644 --- a/modules/http2/h2_mplx.h +++ b/modules/http2/h2_mplx.h @@ -67,7 +67,7 @@ struct h2_mplx { apr_pool_t *pool; apr_bucket_alloc_t *bucket_alloc; - int aborted : 1; + unsigned int aborted : 1; struct h2_task_queue *q; struct h2_io_set *stream_ios; diff --git a/modules/http2/h2_request.h b/modules/http2/h2_request.h index 86f0eac0d24..17e4b23b6ec 100644 --- a/modules/http2/h2_request.h +++ b/modules/http2/h2_request.h @@ -41,9 +41,9 @@ struct h2_request { apr_time_t request_time; apr_off_t content_length; - int chunked : 1; /* iff requst body needs to be forwarded as chunked */ - int eoh : 1; /* iff end-of-headers has been seen and request is complete */ - int push : 1; /* iff server push is possible for this request */ + unsigned int chunked : 1; /* iff requst body needs to be forwarded as chunked */ + unsigned int eoh : 1; /* iff end-of-headers has been seen and request is complete */ + unsigned int push : 1; /* iff server push is possible for this request */ const struct h2_config *config; }; diff --git a/modules/http2/h2_session.h b/modules/http2/h2_session.h index 602bf691398..299e046c375 100644 --- a/modules/http2/h2_session.h +++ b/modules/http2/h2_session.h @@ -64,9 +64,9 @@ struct h2_session { server_rec *s; /* server/vhost we're starting on */ const struct h2_config *config; /* Relevant config for this session */ - int started : 1; /* session startup done */ - int aborted : 1; /* this session is being aborted */ - int reprioritize : 1; /* scheduled streams priority changed */ + unsigned int started : 1; /* session startup done */ + unsigned int aborted : 1; /* this session is being aborted */ + unsigned int reprioritize : 1; /* scheduled streams priority changed */ apr_interval_time_t wait_micros; int unsent_submits; /* number of submitted, but not yet sent diff --git a/modules/http2/h2_stream.h b/modules/http2/h2_stream.h index f15bf66837d..bb884df567f 100644 --- a/modules/http2/h2_stream.h +++ b/modules/http2/h2_stream.h @@ -60,10 +60,10 @@ struct h2_stream { struct h2_response *response; /* the response, once ready */ int rst_error; /* stream error for RST_STREAM */ - int aborted : 1; /* was aborted */ - int suspended : 1; /* DATA sending has been suspended */ - int scheduled : 1; /* stream has been scheduled */ - int submitted : 1; /* response HEADER has been sent */ + unsigned int aborted : 1; /* was aborted */ + unsigned int suspended : 1; /* DATA sending has been suspended */ + unsigned int scheduled : 1; /* stream has been scheduled */ + unsigned int submitted : 1; /* response HEADER has been sent */ apr_off_t input_remaining; /* remaining bytes on input as advertised via content-length */ apr_bucket_brigade *bbin; /* input DATA */ diff --git a/modules/http2/h2_task.h b/modules/http2/h2_task.h index 5a7c79db62a..c0aff2c8247 100644 --- a/modules/http2/h2_task.h +++ b/modules/http2/h2_task.h @@ -55,9 +55,9 @@ struct h2_task { struct conn_rec *c; const struct h2_request *request; - int filters_set : 1; - int input_eos : 1; - int serialize_headers : 1; + unsigned int filters_set : 1; + unsigned int input_eos : 1; + unsigned int serialize_headers : 1; struct h2_task_input *input; struct h2_task_output *output; diff --git a/modules/http2/h2_task_output.h b/modules/http2/h2_task_output.h index 10ec3ccbbcf..3e3b857bc1e 100644 --- a/modules/http2/h2_task_output.h +++ b/modules/http2/h2_task_output.h @@ -38,7 +38,7 @@ struct h2_task_output { struct h2_task *task; h2_task_output_state_t state; struct h2_from_h1 *from_h1; - int trailers_passed : 1; + unsigned int trailers_passed : 1; }; h2_task_output *h2_task_output_create(struct h2_task *task, apr_pool_t *pool); diff --git a/modules/http2/h2_workers.h b/modules/http2/h2_workers.h index f92f3732cef..f79d5cac07f 100644 --- a/modules/http2/h2_workers.h +++ b/modules/http2/h2_workers.h @@ -38,7 +38,7 @@ struct h2_workers { int min_size; int max_size; - int aborted : 1; + unsigned int aborted : 1; apr_threadattr_t *thread_attr;