Make all private functions static

This commit is contained in:
Willem Toorop 2015-08-19 16:15:26 +02:00
parent 450aabefcc
commit 7971152742
4 changed files with 8 additions and 14 deletions

View File

@ -92,8 +92,8 @@ getdns_port_str_array[] = {
};
/* Private functions */
getdns_return_t create_default_namespaces(struct getdns_context *context);
getdns_return_t create_default_dns_transports(struct getdns_context *context);
static getdns_return_t create_default_namespaces(struct getdns_context *context);
static getdns_return_t create_default_dns_transports(struct getdns_context *context);
static struct getdns_list *create_default_root_servers(void);
static getdns_return_t set_os_defaults(struct getdns_context *);
static int transaction_id_cmp(const void *, const void *);
@ -130,7 +130,7 @@ static void destroy_local_host(_getdns_rbnode_t * node, void *arg)
* Helper to get default lookup namespaces.
* TODO: Determine from OS
*/
getdns_return_t
static getdns_return_t
create_default_namespaces(struct getdns_context *context)
{
context->namespaces = GETDNS_XMALLOC(context->my_mf, getdns_namespace_t, 2);
@ -147,7 +147,7 @@ create_default_namespaces(struct getdns_context *context)
/**
* Helper to get default transports.
*/
getdns_return_t
static getdns_return_t
create_default_dns_transports(struct getdns_context *context)
{
context->dns_transports = GETDNS_XMALLOC(context->my_mf, getdns_transport_list_t, 2);

View File

@ -56,14 +56,14 @@
* @return pointer to dictionary item, caller must not free storage associated with item
* @return NULL if additnotfnd == FALSE and key is not in dictionary
*/
struct getdns_dict_item *
static struct getdns_dict_item *
getdns_dict_find(const struct getdns_dict *dict, const char *key)
{
return (struct getdns_dict_item *)
_getdns_rbtree_search((_getdns_rbtree_t *)&(dict->root), key);
} /* getdns_dict_find */
struct getdns_dict_item *
static struct getdns_dict_item *
getdns_dict_find_and_add(struct getdns_dict *dict, const char *key)
{
struct getdns_dict_item *item;
@ -345,7 +345,7 @@ getdns_dict_copy(const struct getdns_dict * srcdict,
* to free the items
* @return void
*/
void
static void
getdns_dict_item_free(_getdns_rbnode_t * node, void *arg)
{
struct getdns_dict_item *item = (struct getdns_dict_item *) node;

View File

@ -146,7 +146,7 @@ getdns_list_get_int(const struct getdns_list * list, size_t index,
* in case of an error the list should be considered unusable
* @return GETDNS_RETURN_GOOD on success, GETDNS_RETURN_GENERIC_ERROR if out of memory
*/
getdns_return_t
static getdns_return_t
getdns_list_realloc(struct getdns_list *list)
{
struct getdns_list_item *newlist;

View File

@ -218,10 +218,4 @@ getdns_service_sync(getdns_context *context, const char *name,
GETDNS_RETURN_GOOD : GETDNS_RETURN_GENERIC_ERROR;
}
void
getdns_free_sync_request_memory(struct getdns_dict *response)
{
getdns_dict_destroy(response);
}
/* getdns_core_sync.c */