]> git.kaiwu.me - nginx.git/commit
Simplified ngx_http_init_listening().
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 20 May 2015 12:51:28 +0000 (15:51 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 20 May 2015 12:51:28 +0000 (15:51 +0300)
commitd5c34785bc55164afb7cfe7de1badcebdb05fb8d
treeac8c4605212157ee2f5b09bc4c053d04bb569ede
parent68b3d28c55e8c24c9998a4292b40c4fbe4afc36f
Simplified ngx_http_init_listening().

There is no need to set "i" to 0, as it's expected to be 0 assuming
the bindings are properly sorted, and we already rely on this when
explicitly set hport->naddrs to 1.  Remaining conditional code is
replaced with identical "hport->naddrs = i + 1".

Identical modifications are done in the mail and stream modules,
in the ngx_mail_optimize_servers() and ngx_stream_optimize_servers()
functions, respectively.

No functional changes.
src/http/ngx_http.c
src/mail/ngx_mail.c
src/stream/ngx_stream.c