Opened 6 years ago

Closed 6 years ago

#1512 closed defect (fixed)

A confusion about code in function ngx_process_options

Reported by: woniu17@… Owned by: Ruslan Ermilov <ru@…>
Priority: minor Milestone:
Component: other Version: 1.13.x
Keywords: Cc:
uname -a: Linux localhost 2.6.32-042stab127.2 #1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.13.5
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
configure arguments: --prefix=/usr/local/nginx --sbin-path=sbin/nginx --conf-path=conf/nginx.conf --pid-path=logs/ --without-http_gzip_module --without-http_rewrite_module --with-debug


in file src/core/nginx.c line 987-991

        if (ngx_path_separator(*p)) {
            cycle->conf_prefix.len = p - ngx_cycle-> + 1;
            cycle-> = ngx_cycle->;

Although cycle and ngx_cycle may point to the same variable, if it is more clear to replace ngx_cycle by cycle?

        if (ngx_path_separator(*p)) {
            cycle->conf_prefix.len = p - cycle-> + 1;
            cycle-> = cycle->;

Change History (1)

comment:1 by Ruslan Ermilov <ru@…>, 6 years ago

Owner: set to Ruslan Ermilov <ru@…>
Resolution: fixed
Status: newclosed

In 7248:fdd6a070d518/nginx:

Improved code readability (closes #1512).

Note: See TracTickets for help on using tickets.