Missing va_end spotted by cppcheck
Silent some cppcheck warnings.
Submitted by: jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1627747 13f79535-47bb-0310-9956-
ffa450edef68
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * core: Add missing va_end spotted by cppcheck
- various: Silent some cppcheck warnings
- trunk patch: http://svn.apache.org/r1619297
- http://svn.apache.org/r1621806
- 2.4.x patch: trunk works (except for mod_journald which is not part of 2.4.x)
- +1: jailletc36, jim, ylavic
-
* mod_cache: CVE-2014-3581 - Avoid a crash when Content-Type has an empty
value. PR56924.
trunk patch: http://svn.apache.org/r1624234
* we are allowed to use the prefix of in HTTP/1.1
*/
char *lang = ((char **) (variant->content_languages->elts))[j];
- int idx = -1;
+ int idx;
/* If we wish to fallback or
* we use our own LanguagePriority index.
apr_uri_t *uri,
char *url, char *server_portstr)
{
- apr_status_t rv = APR_SUCCESS;
+ apr_status_t rv;
apr_pollset_t *pollset;
apr_pollfd_t pollfd;
const apr_pollfd_t *signalled;
len = strlen(s);
ascii_s = apr_pstrmemdup(r->pool, s, len);
ap_xlate_proto_to_ascii(ascii_s, len);
- if (ap_rputs(ascii_s, r) < 0)
+ if (ap_rputs(ascii_s, r) < 0) {
+ va_end(va);
return -1;
+ }
written += len;
}
va_end(va);
do {
const ap_expr_t *val = e2->node_arg1;
AP_DEBUG_ASSERT(e2->node_op == op_ListElement);
- if (strcmp(needle, ap_expr_eval_word(ctx, val)) == 0) {
+ if (strcmp(needle, ap_expr_eval_word(ctx, val)) == 0)
return 1;
- break;
- }
e2 = e2->node_arg2;
} while (e2 != NULL);
}