initialize uninitialized variables.
This commit is contained in:
@@ -2179,14 +2179,13 @@ ngx_int_t ps_html_rewrite_header_filter(ngx_http_request_t* r) {
|
||||
if (!ps_has_stacked_content_encoding(r)) {
|
||||
StringPiece content_encoding =
|
||||
str_to_string_piece(r->headers_out.content_encoding->value);
|
||||
GzipInflater::InflateType inflate_type;
|
||||
GzipInflater::InflateType inflate_type = GzipInflater::kGzip;
|
||||
bool is_encoded = false;
|
||||
if (StringCaseEqual(content_encoding, "deflate")) {
|
||||
is_encoded = true;
|
||||
inflate_type = GzipInflater::kDeflate;
|
||||
} else if (StringCaseEqual(content_encoding, "gzip")) {
|
||||
is_encoded = true;
|
||||
inflate_type = GzipInflater::kGzip;
|
||||
}
|
||||
|
||||
if (is_encoded) {
|
||||
|
||||
@@ -48,7 +48,7 @@ SystemRequestContext* NgxServerContext::NewRequestContext(
|
||||
ngx_http_request_t* r) {
|
||||
// Based on ngx_http_variable_server_port.
|
||||
bool port_set = false;
|
||||
int local_port;
|
||||
int local_port = 0;
|
||||
#if (NGX_HAVE_INET6)
|
||||
if (r->connection->local_sockaddr->sa_family == AF_INET6) {
|
||||
local_port = ntohs(reinterpret_cast<struct sockaddr_in6*>(
|
||||
|
||||
Reference in New Issue
Block a user