patch 8.1.2394: using old C style comments
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
diff --git a/src/sha256.c b/src/sha256.c
index 98ccffe..7bacfe8 100644
--- a/src/sha256.c
+++ b/src/sha256.c
@@ -260,7 +260,7 @@
PUT_UINT32(ctx->state[6], digest, 24);
PUT_UINT32(ctx->state[7], digest, 28);
}
-#endif /* FEAT_CRYPT || FEAT_PERSISTENT_UNDO */
+#endif // FEAT_CRYPT || FEAT_PERSISTENT_UNDO
#if defined(FEAT_CRYPT) || defined(PROTO)
/*
@@ -301,7 +301,7 @@
char_u *salt,
int salt_len)
{
- /* No passwd means don't encrypt */
+ // No passwd means don't encrypt
if (buf == NULL || *buf == NUL)
return (char_u *)"";
@@ -370,7 +370,7 @@
{
failures++;
output[sizeof(output) - 1] = '\0';
- /* printf("sha256_self_test %d failed %s\n", i, output); */
+ // printf("sha256_self_test %d failed %s\n", i, output);
}
}
return failures > 0 ? FAIL : OK;
@@ -382,7 +382,7 @@
# ifdef HAVE_GETTIMEOFDAY
struct timeval tv;
- /* Using usec makes it less predictable. */
+ // Using usec makes it less predictable.
gettimeofday(&tv, NULL);
return (unsigned int)(tv.tv_sec + tv.tv_usec);
# else
@@ -414,14 +414,14 @@
sha256_update(&ctx, (char_u *)random_data, sizeof(random_data));
sha256_finish(&ctx, sha256sum);
- /* put first block into header. */
+ // put first block into header.
for (i = 0; i < header_len; i++)
header[i] = sha256sum[i % sizeof(sha256sum)];
- /* put remaining block into salt. */
+ // put remaining block into salt.
if (salt != NULL)
for (i = 0; i < salt_len; i++)
salt[i] = sha256sum[(i + header_len) % sizeof(sha256sum)];
}
-#endif /* FEAT_CRYPT */
+#endif // FEAT_CRYPT