CLEANUP: vars: factor out common code from vars_get_by_{desc,name}
authorWilly Tarreau <w@1wt.eu>
Fri, 3 Sep 2021 09:40:58 +0000 (11:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Sep 2021 09:43:35 +0000 (11:43 +0200)
commitbe7e00d1343fa8353e47b16cfad08852347e7870
tree274ba8675297c3f52f191b1b5e9ffea766205a95
parente93bff410761bff60f86b74abc9373b80f2c2c09
CLEANUP: vars: factor out common code from vars_get_by_{desc,name}

The two functions vars_get_by_name() and vars_get_by_scope() perform
almost the same operations except that they differ from the way the
name and scope are retrieved. The second part in common is more
complex and involves locking, so better factor this one out into a
new function.

There is no other change than refactoring.
src/vars.c