Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Initialize ngx_buf_t in ngx_create_temp_buf() (1 reply)

$
0
0
Hello,

I don't understand why b->last is used to initialize b->end.
Why it's not :
b->end = b->start + size;

Regards,

yves

# HG changeset patch
# User Yves Crespin<yves.crespin@e-quartz.fr>
# Date 1407480933 -7200
# Node ID 74265a0edba677c967f532de789a4589436aa5fb
# Parent a62fffc16af816612a4acf34c7a4781f454fa5d1
ngx_buf: initialize b->end with b->start

diff -r a62fffc16af8 -r 74265a0edba6 src/core/ngx_buf.c
--- a/src/core/ngx_buf.c Fri Aug 08 08:45:23 2014 +0200
+++ b/src/core/ngx_buf.c Fri Aug 08 08:55:33 2014 +0200
@@ -37,7 +37,7 @@

b->pos = b->start;
b->last = b->start;
- b->end = b->last + size;
+ b->end = b->start + size;
b->temporary = 1;

return b;

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>