initialize uninitialized variables.

This commit is contained in:
Jeffrey Crowell
2015-04-01 14:47:43 -04:00
parent c2a756049e
commit cd19284062
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -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) {
+1 -1
View File
@@ -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*>(