diff options
| author | kaotisk <kaotisk@arching-kaos.org> | 2025-04-29 06:16:56 +0300 | 
|---|---|---|
| committer | kaotisk <kaotisk@arching-kaos.org> | 2025-04-29 19:31:27 +0300 | 
| commit | 1d10339904b31f58d7461c0b806f842609571d92 (patch) | |
| tree | e5e091829b2ab371d55fdbcfff192509664a65e6 /c_implementation/src/ak_fs_mt.c | |
| parent | 41a2642774165afca3b053e28c297e50deb9fe91 (diff) | |
| download | arching-kaos-tools-1d10339904b31f58d7461c0b806f842609571d92.tar.gz arching-kaos-tools-1d10339904b31f58d7461c0b806f842609571d92.tar.bz2 arching-kaos-tools-1d10339904b31f58d7461c0b806f842609571d92.zip  | |
Moving in to provide an interface for it
Diffstat (limited to 'c_implementation/src/ak_fs_mt.c')
| -rw-r--r-- | c_implementation/src/ak_fs_mt.c | 15 | 
1 files changed, 10 insertions, 5 deletions
diff --git a/c_implementation/src/ak_fs_mt.c b/c_implementation/src/ak_fs_mt.c index d083eae..2c3414b 100644 --- a/c_implementation/src/ak_fs_mt.c +++ b/c_implementation/src/ak_fs_mt.c @@ -3,17 +3,17 @@  #include <libaklog.h>  #include <stdbool.h> -bool ak_fs_mt_branch_is_null(mt_branch* node) +bool ak_fs_mt_branch_is_null(mt_branch* n)  { -    if ( node == NULL ) +    if ( n == NULL )      {          ak_log_warning(__func__, "A NULL mt_branch* node was given");          return false;      }      if ( -            ak_fs_sha512sum_is_null(&node->root) && -            ak_fs_sha512sum_is_null(&node->head) && -            ak_fs_sha512sum_is_null(&node->tail) +            ak_fs_sha512sum_is_null(&n->root) && +            ak_fs_sha512sum_is_null(&n->head) && +            ak_fs_sha512sum_is_null(&n->tail)         )      {          return true; @@ -41,6 +41,11 @@ bool ak_fs_mt_branch_compare(mt_branch *a, mt_branch *b)  void ak_fs_mt_branch_print(mt_branch *n)  { +    if ( n == NULL ) +    { +        ak_log_warning(__func__, "NULL mt_branch* was given"); +        return; +    }      printf("r: %s\n", ak_fs_sha512sum_struct_read_as_string(&n->root));      printf("h: %s\n", ak_fs_sha512sum_struct_read_as_string(&n->head));      printf("t: %s\n", ak_fs_sha512sum_struct_read_as_string(&n->tail));  | 
