You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2015/11/21 22:37:09 UTC
svn commit: r1715581 - in /httpd/httpd/trunk/modules/mappers: mod_imagemap.c
mod_negotiation.c
Author: jailletc36
Date: Sat Nov 21 21:37:09 2015
New Revision: 1715581
URL: http://svn.apache.org/viewvc?rev=1715581&view=rev
Log:
Remove some useless 'return' statements.
Fix style.
Modified:
httpd/httpd/trunk/modules/mappers/mod_imagemap.c
httpd/httpd/trunk/modules/mappers/mod_negotiation.c
Modified: httpd/httpd/trunk/modules/mappers/mod_imagemap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_imagemap.c?rev=1715581&r1=1715580&r2=1715581&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_imagemap.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_imagemap.c Sat Nov 21 21:37:09 2015
@@ -486,8 +486,6 @@ static void menu_header(request_rec *r,
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, c
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,
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,
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 *
else if (!strcasecmp(menu, "unformatted")) {
ap_rvputs(r, "<a href=\"", ehref, "\">", etext, "</a>", NULL);
}
- return;
}
static void menu_footer(request_rec *r)
Modified: httpd/httpd/trunk/modules/mappers/mod_negotiation.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_negotiation.c?rev=1715581&r1=1715580&r2=1715581&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_negotiation.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_negotiation.c Sat Nov 21 21:37:09 2015
@@ -791,8 +791,9 @@ static enum header_state get_header_line
*/
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 **ma
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(negotia
}
}
}
- return;
}
/* Determining the content length --- if the map didn't tell us,
@@ -2967,8 +2966,9 @@ static int handle_map_file(request_rec *
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 *
}
res = do_negotiation(r, neg, &best, 0);
- if (res != 0) return res;
+ if (res != 0) {
+ return res;
+ }
if (best->body)
{