]> git.ozlabs.org Git - ccan/commitdiff
crypto: Remove C++ comments
authorJon Griffiths <jon_p_griffiths@yahoo.com>
Tue, 22 Mar 2016 06:57:29 +0000 (19:57 +1300)
committerJon Griffiths <jon_p_griffiths@yahoo.com>
Mon, 22 Aug 2016 12:27:12 +0000 (00:27 +1200)
Prevents warnings from gcc at higher warning levels.

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
ccan/crypto/ripemd160/ripemd160.c
ccan/crypto/ripemd160/ripemd160.h
ccan/crypto/sha256/benchmarks/double-sha-bench.c
ccan/crypto/sha256/sha256.c
ccan/crypto/sha256/sha256.h

index 46a6c950e04396352aedc667a4ade9ef09dfce26..9fc7d140e4b61745f098e3702a74cc83be834ef9 100644 (file)
@@ -282,7 +282,7 @@ static void add(struct ripemd160_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;
@@ -292,7 +292,7 @@ static void add(struct ripemd160_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 {
@@ -305,7 +305,7 @@ static void add(struct ripemd160_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;
        }
index e29e42bb044b3ac63134205731dd3c9c51e5bab8..fc3bf0eabc71d556624e2b085bcfa78b615e0f2f 100644 (file)
@@ -6,7 +6,7 @@
 #include <stdlib.h>
 
 /* Uncomment this to use openssl's RIPEMD160 routines (and link with -lcrypto) */
-//#define CCAN_CRYPTO_RIPEMD160_USE_OPENSSL 1
+/*#define CCAN_CRYPTO_RIPEMD160_USE_OPENSSL 1*/
 
 #ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL
 #include <openssl/ripemd.h>
index b66531b853bfdbf0268664ec2553707b06d42357..09a9900e41d9c9dc218b77d01f89aafaa5869bef 100644 (file)
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
        memset(&block, 0, sizeof(block));
        sha256(&block.h, &n, sizeof(n));
        block.u8[sizeof(block.h)] = 0x80;
-       // Size is 256 bits
+       /* Size is 256 bits */
        block.u8[sizeof(block)-2] = 1;
 
        start = time_now();
index 40da0b4bb670d488b9a051b4307f8c41b9e8c42a..95c700692ce50a0f2a57163a41706f9bb8980c79 100644 (file)
@@ -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;
        }
index eedaa94ee77df0cfe3e875ec45597f364bbea55f..be4b3b7ad4d3581a2eb1693e3d9d32eb4ba342b6 100644 (file)
@@ -6,7 +6,7 @@
 #include <stdlib.h>
 
 /* Uncomment this to use openssl's SHA256 routines (and link with -lcrypto) */
-//#define CCAN_CRYPTO_SHA256_USE_OPENSSL 1
+/*#define CCAN_CRYPTO_SHA256_USE_OPENSSL 1*/
 
 #ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL
 #include <openssl/sha.h>