You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is invariant as neither i is used nor the array pointer of live_servers gets incremented.
Furthermore, what should be tested? That all servers are up? In this case the check would be correct, but I guess we would like to check that a least one server is up and hence the check would need to be:
int rc = FALSE;
int i;
for (i = 0; !rc && i < context->cache_memcache->ntotal; i++)
rc = rc || (context->cache_memcache->live_servers[i]->status != APR_MC_SERVER_DEAD);
return rc;
or
int i;
for (i = 0; i < context->cache_memcache->ntotal; i++) {
if (context->cache_memcache->live_servers[i]->status != APR_MC_SERVER_DEAD)
return TRUE;
}
return FALSE;
The text was updated successfully, but these errors were encountered:
In
mod_auth_openidc/src/cache/memcache.c
Line 229 in 28557c1
doesn't it need to be
because otherwise I don't see how we iterate over all servers as the loop body in
mod_auth_openidc/src/cache/memcache.c
Lines 228 to 229 in 28557c1
is invariant as neither
i
is used nor the array pointer oflive_servers
gets incremented.Furthermore, what should be tested? That all servers are up? In this case the check would be correct, but I guess we would like to check that a least one server is up and hence the check would need to be:
or
The text was updated successfully, but these errors were encountered: