1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

sort_queue(): make @swp variable local to the loop.

This commit is contained in:
Laurent MONIN 2005-12-13 16:50:04 +01:00 committed by Laurent MONIN
parent 2eebef098d
commit 852bdaec88

View File

@ -662,12 +662,10 @@ abort_all_keepalive_connections(void)
static void static void
sort_queue(void) sort_queue(void)
{ {
int swp; while (1) {
do {
struct connection *conn; struct connection *conn;
int swp = 0;
swp = 0;
foreach (conn, connection_queue) { foreach (conn, connection_queue) {
if (!list_has_next(connection_queue, conn)) break; if (!list_has_next(connection_queue, conn)) break;
@ -679,7 +677,9 @@ sort_queue(void)
swp = 1; swp = 1;
} }
} }
} while (swp);
if (!swp) break;
};
} }
static void static void