[PATCH] Event pipe: delete useless code.
胡聪 (hucc)
hucong.c at foxmail.com
Fri Oct 28 08:41:49 UTC 2016
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 at 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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20161028/f021f7fa/attachment.html>
More information about the nginx-devel
mailing list