]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/resolve/resolved-manager.h
resolved: put /etc/hosts hashmaps in a structure and pass that around
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Jul 2018 08:01:46 +0000 (10:01 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Aug 2018 10:38:34 +0000 (12:38 +0200)
commit37b7cc8d9a111c40767e2124fbdc368cc8da5c1c
treeed74791e33d47a7f2d3093d010d6c3c8d569d4c9
parent8d732e2f716a03de8c05c7d01919e2daa3624280
resolved: put /etc/hosts hashmaps in a structure and pass that around

This hides the details of juggling the two hashmaps from the callers a bit.
It also makes memory management a bit easier, because those two hashmaps share
some strings, so we can only free them together.

etc_hosts_parse() is made responsible to free the half-filled data structures
on error, which makes the caller a bit simpler.

No functional change. A refactoring to prepare for later changes.
src/resolve/resolved-etc-hosts.c
src/resolve/resolved-manager.h