diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-04-05 14:26:26 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-04-05 14:26:26 +0900 |
commit | 1cc6c93a9569a9f2664d0d26cd0e50408307c430 (patch) | |
tree | 57e115a1beb9b097f731da79c3192015ff35cc94 /src/resolve/resolved-dns-rr.c | |
parent | 3d282fff063c81893dc4bbd0282193d20dd5357e (diff) | |
download | systemd-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.c | 6 |
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; } |