From 088d71f8edd616a839a6ebfd3ab0c58701678757 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 14 Apr 2023 09:59:27 +0200 Subject: tree-wide: use TAKE_STRUCT --- src/resolve/resolved-etc-hosts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/resolve') 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; } -- cgit v1.2.3