break inside a switch statement inside a for loop
breaks out of the switch statement, not the for loop.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89476
13f79535-47bb-0310-9956-
ffa450edef68
for(;;)
{
/* FIXME: this does not return, despite the incoming connection being accepted */
- switch(rv = apr_accept(&remote_sock, local_sock, r->pool))
- {
- case APR_EINTR:
+ rv = apr_accept(&remote_sock, local_sock, r->pool);
+ if (rv == APR_EINTR) {
continue;
- case APR_SUCCESS:
+ }
+ else if (rv == APR_SUCCESS) {
break;
- default:
+ }
+ else {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"proxy: FTP: failed to accept data connection");
return HTTP_BAD_GATEWAY;