From: Stefan Eissing Date: Mon, 1 Feb 2021 09:01:22 +0000 (+0000) Subject: - fixed a clang error when dividing sizeof(T1i[]) / sizeof(T2). X-Git-Tag: 2.5.0-alpha2-ci-test-only~1034 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2cf280a208be0560b4f5041f8a58c05cc19195f;p=thirdparty%2Fapache%2Fhttpd.git - fixed a clang error when dividing sizeof(T1i[]) / sizeof(T2). these modern compilers have no respect for code from 2009. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1886096 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/simple/simple_run.c b/server/mpm/simple/simple_run.c index a61bfa66bc1..102eed55e2d 100644 --- a/server/mpm/simple/simple_run.c +++ b/server/mpm/simple/simple_run.c @@ -260,7 +260,7 @@ static int simple_setup_pollcb(simple_core_t * sc) apr_status_t rv; int good_methods[] = {APR_POLLSET_KQUEUE, APR_POLLSET_PORT, APR_POLLSET_EPOLL}; - for (i = 0; i < sizeof(good_methods) / sizeof(void*); i++) { + for (i = 0; i < sizeof(good_methods) / sizeof(good_methods[0]); i++) { /* pqXXXXX: make size of pollcb configrable or dynamic */ rv = apr_pollcb_create_ex(&sc->pollcb, 512, sc->pool, APR_POLLSET_NODEFAULT, good_methods[i]);