diff src/sha256.c @ 18812:d34ec6fe207d v8.1.2394

patch 8.1.2394: using old C style comments Commit: https://github.com/vim/vim/commit/63d9e730f726341bf41ee4f4b829253cb9879110 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 5 21:10:38 2019 +0100 patch 8.1.2394: using old C style comments Problem: Using old C style comments. Solution: Use // comments where appropriate.
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 Dec 2019 21:15:04 +0100
parents 27b9a84395b5
children c1d1639b52dd
line wrap: on
line diff
--- a/src/sha256.c
+++ b/src/sha256.c
@@ -260,7 +260,7 @@ sha256_finish(context_sha256_T *ctx, cha
     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 @@ sha256_key(
     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 @@ sha256_self_test(void)
 	{
 	    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 @@ get_some_time(void)
 # 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 @@ sha2_seed(
     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