dedup

deduplicating backup program
git clone git://git.2f30.org/dedup
Log | Files | Refs | README | LICENSE

commit 3ae183aa99bba33b67a2f59447e1e835104b629b
parent 7d0e3db7c6c61fdea091bccb1d8a8e61545be235
Author: sin <sin@2f30.org>
Date:   Wed,  1 May 2019 22:19:30 +0100

Call sodium_init()

Diffstat:
Mbstorage.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/bstorage.c b/bstorage.c @@ -289,6 +289,9 @@ bscreat(struct bctx *bctx, char *path, int mode, struct bparam *bpar) struct bhdr *bhdr; int fd; + if (sodium_init() < 0) + return -1; + fd = open(path, O_RDWR | O_CREAT | O_EXCL, mode); if (fd < 0) return -1; @@ -348,6 +351,9 @@ bsopen(struct bctx *bctx, char *path, int flags, int mode, struct bparam *bpar) return -1; } + if (sodium_init() < 0) + return -1; + fd = open(path, flags, mode); if (fd < 0) return -1;