mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
nicer return value.
git-svn-id: file:///svn/unbound/trunk@3020 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
5421d424ac
commit
17935c9144
1 changed files with 1 additions and 2 deletions
|
|
@ -169,8 +169,7 @@ uint8_t* ldns_str2wire_dname(const char* str, size_t* len)
|
|||
*len = sizeof(dname);
|
||||
if(ldns_str2wire_dname_buf(str, dname, len) == 0) {
|
||||
uint8_t* r = (uint8_t*)malloc(*len);
|
||||
if(r) memcpy(r, dname, *len);
|
||||
return r;
|
||||
if(r) return memcpy(r, dname, *len);
|
||||
}
|
||||
*len = 0;
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue