Use FALLTHROUGH instead of goto.

This commit is contained in:
Emil Mikulic 2003-12-03 09:39:16 +00:00
parent 1623dee16a
commit 84e59c72ac
1 changed files with 14 additions and 17 deletions

View File

@ -2171,8 +2171,21 @@ static void httpd_poll(void)
poll_check_timeout(conn);
switch (conn->state)
{
case DONE:
/* clean out stale connections while we're at it */
if (conn->conn_close)
{
LIST_REMOVE(conn, entries);
free_connection(conn);
safefree(conn);
break;
}
/* else */
recycle_connection(conn);
/* And enqueue as RECV_REQUEST. */
/* FALLTHROUGH */
case RECV_REQUEST:
recv_request:
MAX_FD_SET(conn->socket, &recv_set);
bother_with_timeout = 1;
break;
@ -2183,22 +2196,6 @@ static void httpd_poll(void)
bother_with_timeout = 1;
break;
case DONE:
/* clean out stale connections while we're at it */
if (conn->conn_close)
{
LIST_REMOVE(conn, entries);
free_connection(conn);
safefree(conn);
}
else
{
recycle_connection(conn);
/* And enqueue as RECV_REQUEST. */
goto recv_request;
}
break;
default: errx(1, "invalid state");
}
}