[PATCH] Style: add missing braces

Piotr Sikora piotrsikora at google.com
Mon Feb 22 06:26:02 UTC 2016


# HG changeset patch
# User Piotr Sikora <piotrsikora at google.com>
# Date 1456122109 28800
#      Sun Feb 21 22:21:49 2016 -0800
# Node ID 1c8c7348262e5c00fa4d64333d4de2fe92961934
# Parent  cfc3cfa434ec1e53989f8499e42bf448b9747ec9
Style: add missing braces.

Signed-off-by: Piotr Sikora <piotrsikora at google.com>

diff -r cfc3cfa434ec -r 1c8c7348262e src/core/ngx_parse_time.c
--- a/src/core/ngx_parse_time.c
+++ b/src/core/ngx_parse_time.c
@@ -44,14 +44,15 @@ ngx_parse_http_time(u_char *value, size_
         }
     }
 
-    for (p++; p < end; p++)
+    for (p++; p < end; p++) {
         if (*p != ' ') {
             break;
         }
+    }
 
     if (end - p < 18) {
         return NGX_ERROR;
-        }
+    }
 
     if (fmt != isoc) {
         if (*p < '0' || *p > '9' || *(p + 1) < '0' || *(p + 1) > '9') {
diff -r cfc3cfa434ec -r 1c8c7348262e src/http/ngx_http_header_filter_module.c
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -359,11 +359,13 @@ ngx_http_header_filter(ngx_http_request_
         if (clcf->port_in_redirect) {
 
 #if (NGX_HTTP_SSL)
-            if (c->ssl)
+            if (c->ssl) {
                 port = (port == 443) ? 0 : port;
-            else
+            } else
 #endif
+            {
                 port = (port == 80) ? 0 : port;
+            }
 
         } else {
             port = 0;
diff -r cfc3cfa434ec -r 1c8c7348262e src/http/v2/ngx_http_v2_filter_module.c
--- a/src/http/v2/ngx_http_v2_filter_module.c
+++ b/src/http/v2/ngx_http_v2_filter_module.c
@@ -305,11 +305,13 @@ ngx_http_v2_header_filter(ngx_http_reque
             if (clcf->port_in_redirect) {
 
 #if (NGX_HTTP_SSL)
-                if (fc->ssl)
+                if (fc->ssl) {
                     port = (port == 443) ? 0 : port;
-                else
+                } else
 #endif
+                {
                     port = (port == 80) ? 0 : port;
+                }
 
             } else {
                 port = 0;



More information about the nginx-devel mailing list