Remove some useless 'return' statements.
Remove some useless 'return' statements.
Remove some useless 'return' statements.
Remove some useless 'return' statements.
Remove some useless 'return' statements.
Add a blank line between functions.
Remove some useless 'return' statements.
Fix style and alignment.
Remove some useless 'return' statements.
Fix style.
Remove some useless 'return' statements.
Add a blank line between functions.
Remove some useless 'return' statements.
Remove some useless 'return' statements.
Remove some useless 'return' statements.
Submitted by: jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1722180 13f79535-47bb-0310-9956-
ffa450edef68
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) Remove some useless return statements (+ some minor style changes)
- trunk patch: http://svn.apache.org/r1715567
- http://svn.apache.org/r1715568
- http://svn.apache.org/r1715570
- http://svn.apache.org/r1715571
- http://svn.apache.org/r1715572
- http://svn.apache.org/r1715576
- http://svn.apache.org/r1715581
- http://svn.apache.org/r1715582
- http://svn.apache.org/r1715583
- http://svn.apache.org/r1715584
- http://svn.apache.org/r1715585
- 2.4.x patch: https://people.apache.org/~jailletc36/remove_return.patch
- +1: jailletc36, jim, covener
-
*) mod_ssl: Fix "warning: variable 'hssc' set but not used".
2.4.x only, r1715255 merged in 2.4.18 missed this (trunk) hunk.
2.4.x patch: http://people.apache.org/~ylavic/httpd-2.4.x-ssl_hssc_warning.patch
}
return APR_SUCCESS;
}
+
static apr_status_t destroy_cache(void *data)
{
if (socache_instance) {
return APR_SUCCESS;
}
-
static int authn_cache_precfg(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptmp)
{
apr_status_t rv = ap_mutex_register(pconf, authn_cache_id,
configured = 0;
return OK;
}
+
static int authn_cache_post_config(apr_pool_t *pconf, apr_pool_t *plog,
apr_pool_t *ptmp, server_rec *s)
{
apr_pool_cleanup_register(pconf, (void*)s, destroy_cache, apr_pool_cleanup_null);
return OK;
}
+
static void authn_cache_child_init(apr_pool_t *p, server_rec *s)
{
const char *lock;
ret->context = directory;
return ret;
}
+
/* not sure we want this. Might be safer to document use-all-or-none */
static void* authn_cache_dircfg_merge(apr_pool_t *pool, void *BASE, void *ADD)
{
return apr_pstrcat(r->pool, context, ":", user, ":", realm, NULL);
}
}
+
static void ap_authn_cache_store(request_rec *r, const char *module,
const char *user, const char *realm,
const char* data)
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01683) "Failed to release mutex!");
}
- return;
}
#define MAX_VAL_LEN 100
static authn_status check_password(request_rec *r, const char *user,
const char *password)
{
-
/* construct key
* look it up
* if found, test password
&check_password,
&get_realm_hash,
};
+
static void register_hooks(apr_pool_t *p)
{
ap_register_auth_provider(p, AUTHN_PROVIDER_GROUP, "socache",
unlink(apr_pstrcat(ctx->pool, ctx->data_file, ".pag", NULL));
unlink(apr_pstrcat(ctx->pool, ctx->data_file, ".db", NULL));
unlink(ctx->data_file);
-
- return;
}
static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
ap_rprintf(r, "CacheCurrentSize: %ld\n", size);
ap_rprintf(r, "CacheAvgEntrySize: %d\n", avg);
}
- return;
}
static apr_status_t socache_dbm_iterate(ap_socache_instance_t *ctx,
#if 0
apr_pool_destroy(propdb->p);
#endif
- return;
}
DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
}
#endif
}
-
- return;
}
static void filter_hooks(apr_pool_t *pool)
if (root->right) root->right->dump_done = 0;
debug_printf(ctx, " --- End Parse Tree ---\n\n");
-
- return;
}
#define DEBUG_INIT(ctx, filter, brigade) do { \
if (dodecode && *tag_val) {
decodehtml(*tag_val);
}
-
- return;
}
static int find_file(request_rec *r, const char *directive, const char *tag,
if (conf->track_ttfb) {
ap_add_output_filter(logio_ttfb_filter_name, NULL, r, r->connection);
}
- return;
}
static const char *logio_track_ttfb(cmd_parms *cmd, void *in_dir_config, int arg)
ap_escape_html(r->pool, r->uri),
"</h1>\n<hr />\n\n", NULL);
}
-
- return;
}
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' */
}
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)
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)
else if (!strcasecmp(menu, "unformatted")) {
ap_rvputs(r, "<a href=\"", ehref, "\">", etext, "</a>", NULL);
}
- return;
}
static void menu_footer(request_rec *r)
*/
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);
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
}
}
}
- return;
}
/* Determining the content length --- if the map didn't tell us,
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))) {
}
res = do_negotiation(r, neg, &best, 0);
- if (res != 0) return res;
+ if (res != 0) {
+ return res;
+ }
if (best->body)
{
return;
}
ap_add_output_filter("MOD_EXPIRES", NULL, r, r->connection);
- return;
}
+
static void register_hooks(apr_pool_t *p)
{
/* mod_expires needs to run *before* the cache save filter which is
(dcfg->style == CT_COOKIE2 ? "Set-Cookie2" : "Set-Cookie"),
new_cookie);
apr_table_setn(r->notes, "cookie", apr_pstrdup(r->pool, cookiebuf)); /* log first time */
- return;
}
/* dcfg->regexp is "^cookie_name=([^;]+)|;[ \t]+cookie_name=([^;]+)",
}
}
apr_table_add(r->headers_out, key, value);
- return;
}
/*
r->uri, r->method);
*pread_len = len;
return;
- } else {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01099)
- "No HTTP headers returned by %s (%s)",
- r->uri, r->method);
+ }
+ else {
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01099)
+ "No HTTP headers returned by %s (%s)",
+ r->uri, r->method);
return;
}
}
} while (now < timeup);
apr_socket_close(csd);
- return;
}
AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd)
apr_sleep(apr_time_from_sec(1));
ret->pid = -1;
- return;
}
#if defined(TCP_NODELAY)