mirror of
https://github.com/systemd/systemd
synced 2024-07-21 18:24:38 +00:00
resolve: add missing assertion
This commit is contained in:
parent
14822ede9f
commit
068ef623bd
|
@ -1814,6 +1814,8 @@ DnsTxtItem *dns_txt_item_copy(DnsTxtItem *first) {
|
|||
int dns_txt_item_new_empty(DnsTxtItem **ret) {
|
||||
DnsTxtItem *i;
|
||||
|
||||
assert(ret);
|
||||
|
||||
/* RFC 6763, section 6.1 suggests to treat
|
||||
* empty TXT RRs as equivalent to a TXT record
|
||||
* with a single empty string. */
|
||||
|
@ -1823,7 +1825,6 @@ int dns_txt_item_new_empty(DnsTxtItem **ret) {
|
|||
return -ENOMEM;
|
||||
|
||||
*ret = i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue