diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_http_route.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/nxt_http_route.c b/src/nxt_http_route.c index 2a41d7fa..21e83ecb 100644 --- a/src/nxt_http_route.c +++ b/src/nxt_http_route.c @@ -616,14 +616,13 @@ nxt_http_route_find(nxt_http_routes_t *routes, nxt_str_t *name) route = &routes->route[0]; end = route + routes->items; - do { + while (route < end) { if (nxt_strstr_eq(&(*route)->name, name)) { return *route; } route++; - - } while (route < end); + } return NULL; } @@ -681,12 +680,11 @@ nxt_http_routes_cleanup(nxt_task_t *task, nxt_http_routes_t *routes) route = &routes->route[0]; end = route + routes->items; - do { + while (route < end) { nxt_http_route_cleanup(task, *route); route++; - - } while (route < end); + } } } @@ -699,12 +697,11 @@ nxt_http_route_cleanup(nxt_task_t *task, nxt_http_route_t *route) match = &route->match[0]; end = match + route->items; - do { + while (match < end) { nxt_http_pass_cleanup(task, &(*match)->pass); match++; - - } while (match < end); + } } |