X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fcrypto%2Fsha256%2Fsha256.c;h=95c700692ce50a0f2a57163a41706f9bb8980c79;hb=98d16c40f7cb21268751da58c0cb0d14efd38c5a;hp=40da0b4bb670d488b9a051b4307f8c41b9e8c42a;hpb=be24e496578d7c03bc2fd6239887266e82c8d6da;p=ccan diff --git a/ccan/crypto/sha256/sha256.c b/ccan/crypto/sha256/sha256.c index 40da0b4b..95c70069 100644 --- a/ccan/crypto/sha256/sha256.c +++ b/ccan/crypto/sha256/sha256.c @@ -181,7 +181,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; @@ -191,7 +191,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 { @@ -204,7 +204,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; }