commit 8eb1fae6267c34433156caab59ca534e06b85901
parent e9be30a4e2a0583a262c06a70e676634a69eae3a
Author: sin <sin@2f30.org>
Date: Sun, 12 May 2019 16:55:06 +0100
Style fix
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/snap.c b/snap.c
@@ -110,7 +110,7 @@ initmdhead(struct sctx *sctx)
if (crypto_secretstream_xchacha20poly1305_init_pull(&state,
shdr->header,
- param.key) != 0) {
+ param.key) < 0) {
seterr("invalid crypto header");
return -1;
}
@@ -128,7 +128,7 @@ initmdhead(struct sctx *sctx)
if (crypto_secretstream_xchacha20poly1305_pull(&state, md, NULL, &tag,
buf, sizeof(buf),
- ad, sizeof(ad)) != 0) {
+ ad, sizeof(ad)) < 0) {
seterr("authentication failed");
goto err0;
}