Klaus Demo nginx / 5027350
remove seldom used variable Igor Sysoev 11 years ago
1 changed file(s) with 3 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
158158 ngx_chain_t out;
159159 ngx_list_part_t *part;
160160 ngx_table_elt_t *header;
161 ngx_connection_t *c;
162161 ngx_http_core_loc_conf_t *clcf;
163162 ngx_http_core_srv_conf_t *cscf;
164163 struct sockaddr_in *sin;
301300 }
302301 }
303302
304 c = r->connection;
305
306 switch (c->local_sockaddr->sa_family) {
303 switch (r->connection->local_sockaddr->sa_family) {
307304
308305 #if (NGX_HAVE_INET6)
309306 case AF_INET6:
310 sin6 = (struct sockaddr_in6 *) c->local_sockaddr;
307 sin6 = (struct sockaddr_in6 *) r->connection->local_sockaddr;
311308 port = ntohs(sin6->sin6_port);
312309 break;
313310 #endif
314311 default: /* AF_INET */
315 sin = (struct sockaddr_in *) c->local_sockaddr;
312 sin = (struct sockaddr_in *) r->connection->local_sockaddr;
316313 port = ntohs(sin->sin_port);
317314 break;
318315 }