dict_set_this_bindata not used anywhere

This commit is contained in:
Willem Toorop 2016-03-21 13:07:20 +01:00
parent 4551f0850b
commit 4e0ee15b73
2 changed files with 9 additions and 26 deletions

View File

@ -602,40 +602,26 @@ getdns_dict_set_list(
/*---------------------------------------- getdns_dict_set_bindata */
getdns_return_t
_getdns_dict_set_this_bindata(
getdns_dict *dict, const char *name, getdns_bindata *bindata)
_getdns_dict_set_const_bindata(
getdns_dict *dict, const char *name, size_t size, const void *data)
{
getdns_item *item;
getdns_bindata *newbindata;
getdns_return_t r;
if (!dict || !name)
return GETDNS_RETURN_INVALID_PARAMETER;
if ((r = _getdns_dict_find_and_add(dict, name, &item)))
return r;
item->dtype = t_bindata;
item->data.bindata = bindata;
return GETDNS_RETURN_GOOD;
} /* getdns_dict_set_bindata */
getdns_return_t
_getdns_dict_set_const_bindata(
getdns_dict *dict, const char *name, size_t size, const void *data)
{
getdns_bindata *newbindata;
getdns_return_t r;
if (!dict)
return GETDNS_RETURN_INVALID_PARAMETER;
if (!(newbindata = _getdns_bindata_copy(&dict->mf, size, data)))
return GETDNS_RETURN_MEMORY_ERROR;
if ((r = _getdns_dict_set_this_bindata(dict, name, newbindata)))
if ((r = _getdns_dict_find_and_add(dict, name, &item))) {
_getdns_bindata_destroy(&dict->mf, newbindata);
return r;
return r;
}
item->dtype = t_bindata;
item->data.bindata = newbindata;
return GETDNS_RETURN_GOOD;
}
getdns_return_t

View File

@ -92,9 +92,6 @@ getdns_return_t _getdns_dict_set_this_dict(getdns_dict *dict,
getdns_return_t _getdns_dict_set_this_list(getdns_dict *dict,
const char *name, getdns_list *child_list);
getdns_return_t _getdns_dict_set_this_bindata(getdns_dict *dict,
const char *name, getdns_bindata *child_bindata);
getdns_return_t _getdns_dict_set_const_bindata(getdns_dict *dict,
const char *name, size_t size, const void *data);