From bd8e73aad283611c096f07e0fc16aa4985f9f2eb Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 30 Apr 2021 23:27:11 +0200 Subject: implemented database --- src/tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tree.c') diff --git a/src/tree.c b/src/tree.c index 4395c81..974a5bb 100644 --- a/src/tree.c +++ b/src/tree.c @@ -6,7 +6,7 @@ #include "tree.h" -static int string_compare ( char* _1, char* _2 ); +static int string_compare ( const char* _1, const char* _2 ); /** * ignore-case alphabetical string compare @@ -15,7 +15,7 @@ static int string_compare ( char* _1, char* _2 ); * -1 :: _1 < _2 * +1 :: _1 > _2 * */ -static int string_compare ( char* _1, char* _2 ) +static int string_compare ( const char* _1, const char* _2 ) { if ( !_1 || !_2 ) return 99; @@ -144,7 +144,7 @@ int tree_destroy ( struct tree_node** _root, uint8_t _options ) return 0; } -void* tree_get ( struct tree_node** _root, char* _query ) +void* tree_get ( struct tree_node** _root, const char* _query ) { struct tree_node** node = _root; -- cgit v1.2.3