X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fcrypto%2Fsha256%2Fsha256.c;h=d42b47b0a587c3df97b0e67f785800715cc12da8;hb=61aead95bb68f33d7f38998f0e8ff7c81141f99f;hp=21d17c40dd9d97562f128c830ba6f46f34fb75a0;hpb=c82067334270187ef77d50715a838e3dbbdfea3c;p=ccan diff --git a/ccan/crypto/sha256/sha256.c b/ccan/crypto/sha256/sha256.c index 21d17c40..d42b47b0 100644 --- a/ccan/crypto/sha256/sha256.c +++ b/ccan/crypto/sha256/sha256.c @@ -182,7 +182,7 @@ static void add(struct sha256_ctx *ctx, const void *p, size_t len) size_t bufsize = ctx->bytes % 64; if (bufsize + len >= 64) { - // Fill the buffer, and process it. + /* Fill the buffer, and process it. */ memcpy(ctx->buf.u8 + bufsize, data, 64 - bufsize); ctx->bytes += 64 - bufsize; data += 64 - bufsize; @@ -192,7 +192,7 @@ static void add(struct sha256_ctx *ctx, const void *p, size_t len) } while (len >= 64) { - // Process full chunks directly from the source. + /* Process full chunks directly from the source. */ if (alignment_ok(data, sizeof(uint32_t))) Transform(ctx->s, (const uint32_t *)data); else { @@ -205,7 +205,7 @@ static void add(struct sha256_ctx *ctx, const void *p, size_t len) } if (len) { - // Fill the buffer with what remains. + /* Fill the buffer with what remains. */ memcpy(ctx->buf.u8 + bufsize, data, len); ctx->bytes += len; }