Welcome! Log In Create A New Profile

Advanced

[PATCH] Event pipe: delete useless code.

胡聪 (hucc)
October 28, 2016 04:44AM
Hello!

It is useless code. There is no need to judge whether the first buf
is partially filled, just add the free buf after the head.



# HG changeset patch

# User hucongcong <hucong.c@foxmail.com>

# Date 1477643468 -28800

# Fri Oct 28 16:31:08 2016 +0800

# Node ID 6729731c835d800aa690d8d3a362b0c989885ab3

# Parent b123eae3fd4e72e430247690e0cec5838b546055

Event pipe: delete useless code.




diff -r b123eae3fd4e -r 6729731c835d src/event/ngx_event_pipe.c

--- a/src/event/ngx_event_pipe.c Thu Oct 27 17:57:16 2016 +0300

+++ b/src/event/ngx_event_pipe.c Fri Oct 28 16:31:08 2016 +0800

@@ -1037,17 +1037,7 @@

return NGX_OK;

}



- if (p->free_raw_bufs->buf->pos == p->free_raw_bufs->buf->last) {

-

- /* add the free buf to the list start */

-

- cl->next = p->free_raw_bufs;

- p->free_raw_bufs = cl;

-

- return NGX_OK;

- }

-

- /* the first free buf is partially filled, thus add the free buf after it */

+ /* the first buf might be partially filled, thus add the free buf after it */



cl->next = p->free_raw_bufs->next;



p->free_raw_bufs->next = cl;_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Event pipe: delete useless code.

胡聪 (hucc) 377 October 28, 2016 04:44AM

Re: [PATCH] Event pipe: delete useless code.

Maxim Dounin 187 October 28, 2016 09:06AM



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

Online Users

Guests: 164
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