aboutsummaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-05-02 19:15:56 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-05-02 19:15:56 +0200
commit98c68ed8cc11fa8932e480256b2544c50aaa790b (patch)
tree97e7a5b0a3af20dd3e5014cfbb3e17289cb64c88 /src/database.c
parent009dc3ba991290de19f0a5e4e4a25a33e82689cc (diff)
downloaddns-98c68ed8cc11fa8932e480256b2544c50aaa790b.tar.gz
convert to typedef structs
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/database.c b/src/database.c
index ddb3519..ba64a8e 100644
--- a/src/database.c
+++ b/src/database.c
@@ -6,9 +6,9 @@
#include "database.h"
-static int database_init ( struct database* _database ) {
+static int database_init ( database_t* _database ) {
// Initialize 2D array of tree_node pointers, paranoia style
- if ( !( _database->zone = malloc( sizeof( struct tree_node** ) * DB_CLASS_LEN ) ) )
+ if ( !( _database->zone = malloc( sizeof( tree_node_t** ) * DB_CLASS_LEN ) ) )
return 1;
size_t rr_size = sizeof( struct tree_node* ) * DB_RR_LEN;
@@ -23,7 +23,7 @@ static int database_init ( struct database* _database ) {
}
int database_populate (
- struct database* _database,
+ database_t* _database,
char* _zonefile
) {
if ( database_init( _database ) ) {
@@ -53,7 +53,7 @@ int database_populate (
return 0;
}
-int database_destroy ( struct database* _database ) {
+int database_destroy ( database_t* _database ) {
if ( !_database || !_database->zone )
return 1;
@@ -73,8 +73,8 @@ int database_destroy ( struct database* _database ) {
}
int database_query (
- struct database_rdata* _rdata,
- struct database* _database,
+ database_rdata_t* _rdata,
+ database_t* _database,
const char* _qname,
int _qname_len,
uint16_t _qtype,