summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-transaction.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-16 14:10:28 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-16 14:27:59 +0100
commit1f38830153b493b1acc7d1422f5aefd88228d373 (patch)
treeaf651aa5468ddad631065d1cb4a44fd45608ba62 /src/resolve/resolved-dns-transaction.h
parentd3b56a0cad6c397e020b5dc2105cf49ca3d92c42 (diff)
downloadsystemd-1f38830153b493b1acc7d1422f5aefd88228d373.tar.gz
resolved: make dns_transaction_gc return a pointer
_gc() does cleanup if it is possible. So far it returned a bool to signal if it succeeded (false on success). When working on the resolved code I had to look at the definition every time, because the (arguably reversed) calling convention is unobvious. So let's return a pointer (non-NULL: gc has not been done, NULL: gc has been done). This fits nicely with the standard to return a pointer from all free functions obviously.
Diffstat (limited to 'src/resolve/resolved-dns-transaction.h')
-rw-r--r--src/resolve/resolved-dns-transaction.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-transaction.h b/src/resolve/resolved-dns-transaction.h
index 9376d504bf..3632daeb15 100644
--- a/src/resolve/resolved-dns-transaction.h
+++ b/src/resolve/resolved-dns-transaction.h
@@ -143,7 +143,7 @@ struct DnsTransaction {
int dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsResourceKey *key, DnsPacket *bypass, uint64_t flags);
DnsTransaction* dns_transaction_free(DnsTransaction *t);
-bool dns_transaction_gc(DnsTransaction *t);
+DnsTransaction* dns_transaction_gc(DnsTransaction *t);
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsTransaction*, dns_transaction_gc);
int dns_transaction_go(DnsTransaction *t);