Hello!<div><br></div><div>It is useless code.  There is no need to judge whether the first buf</div><div>is partially filled, just add the free buf after the head.<br><div><br></div><div>




<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #000000; background-color: #ffffff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #000000; background-color: #ffffff; min-height: 15.0px}
span.s1 {font-variant-ligatures: no-common-ligatures}
span.Apple-tab-span {white-space:pre}
</style>


<p class="p1"><span class="s1"># HG changeset patch</span></p><p class="p1"><span class="s1"># User hucongcong <hucong.c@foxmail.com></span></p><p class="p1"><span class="s1"># Date 1477643468 -28800</span></p><p class="p1"><span class="s1">#      Fri Oct 28 16:31:08 2016 +0800</span></p><p class="p1"><span class="s1"># Node ID 6729731c835d800aa690d8d3a362b0c989885ab3</span></p><p class="p1"><span class="s1"># Parent  b123eae3fd4e72e430247690e0cec5838b546055</span></p><p class="p1"><span class="s1">Event pipe: delete useless code.</span></p><p class="p2"><span class="s1"></span><br></p><p class="p1"><span class="s1">diff -r b123eae3fd4e -r 6729731c835d src/event/ngx_event_pipe.c</span></p><p class="p1"><span class="s1">--- a/src/event/ngx_event_pipe.c<span class="Apple-tab-span">      </span>Thu Oct 27 17:57:16 2016 +0300</span></p><p class="p1"><span class="s1">+++ b/src/event/ngx_event_pipe.c<span class="Apple-tab-span">  </span>Fri Oct 28 16:31:08 2016 +0800</span></p><p class="p1"><span class="s1">@@ -1037,17 +1037,7 @@</span></p><p class="p1"><span class="s1">         return NGX_OK;</span></p><p class="p1"><span class="s1">     }</span></p><p class="p2"><span class="s1"> </span></p><p class="p1"><span class="s1">-    if (p->free_raw_bufs->buf->pos == p->free_raw_bufs->buf->last) {</span></p><p class="p1"><span class="s1">-</span></p><p class="p1"><span class="s1">-        /* add the free buf to the list start */</span></p><p class="p1"><span class="s1">-</span></p><p class="p1"><span class="s1">-        cl->next = p->free_raw_bufs;</span></p><p class="p1"><span class="s1">-        p->free_raw_bufs = cl;</span></p><p class="p1"><span class="s1">-</span></p><p class="p1"><span class="s1">-        return NGX_OK;</span></p><p class="p1"><span class="s1">-    }</span></p><p class="p1"><span class="s1">-</span></p><p class="p1"><span class="s1">-    /* the first free buf is partially filled, thus add the free buf after it */</span></p><p class="p1"><span class="s1">+    /* the first buf might be partially filled, thus add the free buf after it */</span></p><p class="p2"><span class="s1"> </span></p><p class="p1"><span class="s1">     cl->next = p->free_raw_bufs->next;</span></p><p class="p1">




<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #000000; background-color: #ffffff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #000000; background-color: #ffffff; min-height: 15.0px}
span.s1 {font-variant-ligatures: no-common-ligatures}
span.Apple-tab-span {white-space:pre}
</style>































</p><p class="p1"><span class="s1">     p->free_raw_bufs->next = cl;</span></p></div></div>