Welcome! Log In Create A New Profile

Advanced

Re: Limit req: Remove unused struct element

Maxim Dounin
October 07, 2016 10:16PM
Hello!

On Fri, Oct 07, 2016 at 05:51:49PM -0700, Robert Paprocki wrote:

> # HG changeset patch
> # User Robert Paprocki <robert@cryptobells.com>
> # Date 1475887216 25200
> # Fri Oct 07 17:40:16 2016 -0700
> # Node ID eb5109e432b6138d2a128fd3766be2dbb11974af
> # Parent 1606a817c1d48ed351f1dd7d9cb9c996e2c77b9a
> Limit req: Remove unused struct element
>
> dummy doesn't appear to be necessary for padding alignment,
> and is unused in this module.
>
> diff -r 1606a817c1d4 -r eb5109e432b6
> src/http/modules/ngx_http_limit_req_module.c
> --- a/src/http/modules/ngx_http_limit_req_module.c Fri Oct 07 16:59:14 2016
> +0300
> +++ b/src/http/modules/ngx_http_limit_req_module.c Fri Oct 07 17:40:16 2016
> -0700
> @@ -12,7 +12,6 @@
>
> typedef struct {
> u_char color;
> - u_char dummy;
> u_short len;
> ngx_queue_t queue;
> ngx_msec_t last;

While it is not stricly necessary, it corresponds to the "data"
field in the ngx_rbtree_node_t and it is better to have it
explicitly present to simplify understanding of the code.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Limit req: Remove unused struct element

Robert Paprocki 417 October 07, 2016 08:54PM

Re: Limit req: Remove unused struct element

Maxim Dounin 196 October 07, 2016 10:16PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 152
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready