MINOR: server: return the next srv instance on free_server

As a convenience, return the next server instance from servers list on
free_server.

This is particularily useful when using this function on the servers
list without having to save of the next pointer before calling it.
This commit is contained in:
Amaury Denoyelle
2021-08-25 15:03:46 +02:00
parent cd61e8383d
commit f5c1e12e44
3 changed files with 16 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ int srv_set_addr_via_libc(struct server *srv, int *err_code);
int srv_init_addr(void);
struct server *cli_find_server(struct appctx *appctx, char *arg);
struct server *new_server(struct proxy *proxy);
void free_server(struct server *srv);
struct server *free_server(struct server *srv);
int srv_init_per_thr(struct server *srv);
/* functions related to server name resolution */