]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Remove some useless 'return' statements.
authorChristophe Jaillet <jailletc36@apache.org>
Sat, 21 Nov 2015 21:37:09 +0000 (21:37 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sat, 21 Nov 2015 21:37:09 +0000 (21:37 +0000)
Fix style.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715581 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_imagemap.c
modules/mappers/mod_negotiation.c

index 65b9eb15d2aaa4874e7b7567c65767356cb4dae5..187a500a5d2256f8f4901d51c70cf137729cb8d4 100644 (file)
@@ -486,8 +486,6 @@ static void menu_header(request_rec *r, char *menu)
                   ap_escape_html(r->pool, r->uri),
                   "</h1>\n<hr />\n\n", NULL);
     }
-
-    return;
 }
 
 static void menu_blank(request_rec *r, char *menu)
@@ -501,11 +499,11 @@ static void menu_blank(request_rec *r, char *menu)
     else if (!strcasecmp(menu, "unformatted")) {
         ap_rputs("\n", r);
     }
-    return;
 }
 
 static void menu_comment(request_rec *r, char *menu, char *comment)
 {
+    /* comments are ignored in the 'formatted' form */
     if (!strcasecmp(menu, "formatted")) {
         ap_rputs("\n", r);         /* print just a newline if 'formatted' */
     }
@@ -515,8 +513,6 @@ static void menu_comment(request_rec *r, char *menu, char *comment)
     else if (!strcasecmp(menu, "unformatted") && *comment) {
         ap_rvputs(r, comment, "\n", NULL);
     }
-    return;                     /* comments are ignored in the
-                                   'formatted' form */
 }
 
 static void menu_default(request_rec *r, const char *menu, const char *href, const char *text)
@@ -541,7 +537,6 @@ static void menu_default(request_rec *r, const char *menu, const char *href, con
     else if (!strcasecmp(menu, "unformatted")) {
         ap_rvputs(r, "<a href=\"", ehref, "\">", etext, "</a>", NULL);
     }
-    return;
 }
 
 static void menu_directive(request_rec *r, const char *menu, const char *href, const char *text)
@@ -566,7 +561,6 @@ static void menu_directive(request_rec *r, const char *menu, const char *href, c
     else if (!strcasecmp(menu, "unformatted")) {
         ap_rvputs(r, "<a href=\"", ehref, "\">", etext, "</a>", NULL);
     }
-    return;
 }
 
 static void menu_footer(request_rec *r)
index 84ce114ec38eca10dd3c5dbd9d37ff65816758e2..7f45388ff40128e2fc399de4198836d971eba806 100644 (file)
@@ -791,8 +791,9 @@ static enum header_state get_header_line(char *buffer, int len, apr_file_t *map)
              */
 
             while (c != '\n' && apr_isspace(c)) {
-                if(apr_file_getc(&c, map) != APR_SUCCESS)
+                if (apr_file_getc(&c, map) != APR_SUCCESS) {
                     break;
+                }
             }
 
             apr_file_ungetc(c, map);
@@ -1058,10 +1059,9 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg,
     return OK;
 }
 
-
 /* Sort function used by read_types_multi. */
-static int variantsortf(var_rec *a, var_rec *b) {
-
+static int variantsortf(var_rec *a, var_rec *b)
+{
     /* First key is the source quality, sort in descending order. */
 
     /* XXX: note that we currently implement no method of setting the
@@ -1727,7 +1727,6 @@ static void set_language_quality(negotiation_state *neg, var_rec *variant)
             }
         }
     }
-    return;
 }
 
 /* Determining the content length --- if the map didn't tell us,
@@ -2967,8 +2966,9 @@ static int handle_map_file(request_rec *r)
     char *udir;
     const char *new_req;
 
-    if(strcmp(r->handler,MAP_FILE_MAGIC_TYPE) && strcmp(r->handler,"type-map"))
+    if (strcmp(r->handler, MAP_FILE_MAGIC_TYPE) && strcmp(r->handler, "type-map")) {
         return DECLINED;
+    }
 
     neg = parse_accept_headers(r);
     if ((res = read_type_map(&map, neg, r))) {
@@ -2976,7 +2976,9 @@ static int handle_map_file(request_rec *r)
     }
 
     res = do_negotiation(r, neg, &best, 0);
-    if (res != 0) return res;
+    if (res != 0) {
+        return res;
+    }
 
     if (best->body)
     {