From: Stefan Eissing Date: Sun, 25 Oct 2015 09:30:51 +0000 (+0000) Subject: fixing compilation issue for older platform X-Git-Tag: 2.5.0-alpha~2694 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ecd2fa70af4fcf1200aa769a5c5f5c1422313f52;p=apache fixing compilation issue for older platform git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710419 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/protocol.c b/server/protocol.c index fc2a20f602..f8b9b103a4 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -2000,11 +2000,13 @@ AP_DECLARE(apr_status_t) ap_get_protocol_upgrades(conn_rec *c, request_rec *r, existing = ap_get_protocol(c); if (conf->protocols->nelts > 1 || !ap_array_str_contains(conf->protocols, existing)) { + int i; + /* possibly more than one choice or one, but not the * existing. (TODO: maybe 426 and Upgrade then?) */ upgrades = apr_array_make(pool, conf->protocols->nelts + 1, sizeof(char *)); - for (int i = 0; i < conf->protocols->nelts; ++i) { + for (i = 0; i < conf->protocols->nelts; i++) { const char *p = APR_ARRAY_IDX(conf->protocols, i, char *); if (strcmp(existing, p)) { /* not the one we have and possible, add in this order */