Style, indentation. No functional change.
As in 'dav_generic_do_refresh', add missing break in 'dav_fs_do_refresh' to avoid useless computation.
Add missing break in 'dav_generic_do_refresh' to avoid useless computation.
Allocate correct size for the array to avoid useless memory allocation and copy
Add missing break.
Oops (fix r1556912)
No need to test for NULL, apr_pstrndup already handles it.
Remove some useless declarations that were shadowing other local
variables of the same name.
Submitted by: jailletc36, sf
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1562134 13f79535-47bb-0310-9956-
ffa450edef68
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * Easy proposals, synch 2.4 and trunk:
- mod_dav: Style, indentation. No functional change.
- mod_dav: Add missing break in 'dav_generic_do_refresh' to avoid useless computation
- mod_dav: Add missing break in 'dav_fs_do_refresh' to avoid useless computation
- mod_macro: Allocate correct size for the array to avoid useless memory allocation and copy
- mod_proxy: Add missing break.
- mod_proxy: oops (fix r1556912)
- server/regex: No need to test for NULL, apr_pstrndup already handles it.
- various: Remove some useless declarations that were shadowing other local variables of the same name.
- trunk patches: http://svn.apache.org/r1557317
- http://svn.apache.org/r1556911
- http://svn.apache.org/r1556914
- http://svn.apache.org/r1555259
- http://svn.apache.org/r1556912
- http://svn.apache.org/r1556937
- http://svn.apache.org/r1559351
- http://svn.apache.org/r1463046
- 2.4.x patch: http://people.apache.org/~jailletc36/backport6.patch
- +1: jailletc36, jim, trawick
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
provider_name);
}
if (prvdraliasrec->provider->parse_require_line) {
- const char *err = prvdraliasrec->provider->parse_require_line(cmd,
+ err = prvdraliasrec->provider->parse_require_line(cmd,
provider_args, &prvdraliasrec->provider_parsed_args);
if (err)
return apr_psprintf(cmd->pool,
int i;
if (result) {
- *result = apr_array_make(pool, 1, sizeof(char *));
+ *result = apr_array_make(pool, contents->nelts, sizeof(char *));
}
/* for each line of the macro body */
{
dp->f.timeout = new_time;
dirty = 1;
+ break;
}
}
{
dp->f.timeout = new_time;
dirty = 1;
+ break;
}
}
continue;
if (!res_hooks->get_resource_type(resource, &name, &uri) &&
- name) {
+ name) {
if (!uri || !strcasecmp(uri, "DAV:"))
value = apr_pstrcat(p, value ? value : "",
- "<D:", name, "/>", NULL);
- else
+ "<D:", name, "/>", NULL);
+ else
value = apr_pstrcat(p, value ? value : "",
- "<x:", name,
- " xmlns:x=\"", uri,
- "\"/>", NULL);
+ "<x:", name,
+ " xmlns:x=\"", uri,
+ "\"/>", NULL);
}
- }
+ }
}
switch (resource->type) {
case DAV_RESOURCE_TYPE_VERSION:
else {
/* ### should we denote lock-null resources? */
if (value == NULL) {
- value = ""; /* becomes: <D:resourcetype/> */
- }
+ value = ""; /* becomes: <D:resourcetype/> */
+ }
}
break;
case DAV_RESOURCE_TYPE_HISTORY:
for (i = 0; i < conf->noproxies->nelts; i++) {
if (strcasecmp(arg, list[i].name) == 0) { /* ignore case for host names */
found = 1;
+ break;
}
}
/* Don't duplicate entries */
for (i = 0; i < conf->dirconn->nelts; i++) {
- if (strcasecmp(arg, list[i].name) == 0)
+ if (strcasecmp(arg, list[i].name) == 0) {
found = 1;
+ break;
+ }
}
if (!found) {
#include "fdqueue.h"
#include "apr_atomic.h"
-typedef struct recycled_pool
+struct recycled_pool
{
apr_pool_t *pool;
struct recycled_pool *next;
-} recycled_pool;
+};
struct fd_queue_info_t
{
int max_idlers;
int max_recycled_pools;
apr_uint32_t recycled_pools_count;
- recycled_pool *recycled_pools;
+ struct recycled_pool *recycled_pools;
};
static apr_status_t queue_info_cleanup(void *data_)
remainder = pattern + startl + oldl;
if (rx->flags & AP_REG_MULTI) {
/* recurse to do any further matches */
- char *subs;
ret += ap_rxplus_exec(pool, rx, remainder, &subs);
if (ret > 1) {
/* a further substitution happened */
int len;
const char *match;
ap_rxplus_match(rx, n, &len, &match);
- return (match != NULL) ? apr_pstrndup(pool, match, len) : NULL;
+ return apr_pstrndup(pool, match, len);
}