summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-rr.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-04-05 14:26:26 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-04-05 14:26:26 +0900
commit1cc6c93a9569a9f2664d0d26cd0e50408307c430 (patch)
tree57e115a1beb9b097f731da79c3192015ff35cc94 /src/resolve/resolved-dns-rr.c
parent3d282fff063c81893dc4bbd0282193d20dd5357e (diff)
downloadsystemd-1cc6c93a9569a9f2664d0d26cd0e50408307c430.tar.gz
tree-wide: use TAKE_PTR() and TAKE_FD() macros
Diffstat (limited to 'src/resolve/resolved-dns-rr.c')
-rw-r--r--src/resolve/resolved-dns-rr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
index 4056bda558..f668284682 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/resolve/resolved-dns-rr.c
@@ -560,8 +560,7 @@ int dns_resource_record_new_reverse(DnsResourceRecord **ret, int family, const u
if (!rr->ptr.name)
return -ENOMEM;
- *ret = rr;
- rr = NULL;
+ *ret = TAKE_PTR(rr);
return 0;
}
@@ -1734,8 +1733,7 @@ DnsResourceRecord *dns_resource_record_copy(DnsResourceRecord *rr) {
break;
}
- t = copy;
- copy = NULL;
+ t = TAKE_PTR(copy);
return t;
}