summaryrefslogtreecommitdiffstats
path: root/src/resolve
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2023-04-14 09:59:27 +0200
committerDavid Tardon <dtardon@redhat.com>2023-04-14 10:15:44 +0200
commit088d71f8edd616a839a6ebfd3ab0c58701678757 (patch)
tree9940b5f1d136299157eebbdc13be06f6fa92ea6c /src/resolve
parentMerge pull request #27254 from poettering/cmsg-align-check (diff)
downloadsystemd-088d71f8edd616a839a6ebfd3ab0c58701678757.tar.xz
systemd-088d71f8edd616a839a6ebfd3ab0c58701678757.zip
tree-wide: use TAKE_STRUCT
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-etc-hosts.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/resolve/resolved-etc-hosts.c b/src/resolve/resolved-etc-hosts.c
index cf0e2be5fa..5eee9c57b2 100644
--- a/src/resolve/resolved-etc-hosts.c
+++ b/src/resolve/resolved-etc-hosts.c
@@ -313,8 +313,7 @@ int etc_hosts_parse(EtcHosts *hosts, FILE *f) {
strip_localhost(&t);
etc_hosts_clear(hosts);
- *hosts = t;
- t = (EtcHosts) {}; /* prevent cleanup */
+ *hosts = TAKE_STRUCT(t);
return 0;
}