logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mtree_init, mtree_free - initialize and free a merkle tree

Description

       The tree_init function initializes the merkle tree structure tree with base data size sz.  sz is the size
       in bytes of the base file or data which will be used to build the tree by calling mtree_build(3).

Errors

ENOMEM Not enough space/cannot allocate memory (POSIX.1-2001).

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       mtree_init, mtree_free - initialize and free a merkle tree

Return Value

mtree_init() returns zero on success.  On error, -1 is returned, and errno is set to indicate the error.

       The mtree_free() function returns no value, and preserves errno.

See Also

mdex_get(3), mdex_put(3), mdex_del(3)

LIBRECAST                                          2023-06-20                                      MTREE_INIT(3)

Synopsis

#include<librecast/mtree.h>intmtree_init(mtree_t*tree,size_tsz);voidmtree_free(mtree_t*tree);

       Compile and link with -llibrecast.

See Also