From 4bb5d44a76c1314668f670c5ebe934bd469467da Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:32:07 +0000 Subject: [PATCH] compact --- src/secret.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/secret.c b/src/secret.c index 982d8bf..da3b6a6 100644 --- a/src/secret.c +++ b/src/secret.c @@ -218,12 +218,8 @@ static void clear_buffer(void *buf, size_t sz) { static void hash_bytes(R_outpstream_t stream, void *src, int len) { secretbase_context *sctx = (secretbase_context *) stream->data; - if (sctx->skip) { - sctx->skip--; - } else { - mbedtls_sha3_update(sctx->ctx, (const uint8_t *) src, (size_t) len); - } - + sctx->skip ? (void) sctx->skip-- : mbedtls_sha3_update(sctx->ctx, (const uint8_t *) src, (size_t) len); + } static void hash_file(mbedtls_sha3_context *ctx, const SEXP x) {