summaryrefslogtreecommitdiffstats
path: root/src/liblzma/check/crc64_tablegen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/check/crc64_tablegen.c')
-rw-r--r--src/liblzma/check/crc64_tablegen.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/liblzma/check/crc64_tablegen.c b/src/liblzma/check/crc64_tablegen.c
index fddaa7e..2035127 100644
--- a/src/liblzma/check/crc64_tablegen.c
+++ b/src/liblzma/check/crc64_tablegen.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file crc64_tablegen.c
@@ -8,9 +10,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
@@ -43,7 +42,7 @@ init_crc64_table(void)
#ifdef WORDS_BIGENDIAN
for (size_t s = 0; s < 4; ++s)
for (size_t b = 0; b < 256; ++b)
- crc64_table[s][b] = bswap64(crc64_table[s][b]);
+ crc64_table[s][b] = byteswap64(crc64_table[s][b]);
#endif
return;
@@ -53,9 +52,11 @@ init_crc64_table(void)
static void
print_crc64_table(void)
{
- printf("/* This file has been automatically generated by "
- "crc64_tablegen.c. */\n\n"
- "const uint64_t lzma_crc64_table[4][256] = {\n\t{");
+ // Split the SPDX string so that it won't accidentally match
+ // when tools search for the string.
+ printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
+ "// This file has been generated by crc64_tablegen.c.\n\n"
+ "const uint64_t lzma_crc64_table[4][256] = {\n\t{");
for (size_t s = 0; s < 4; ++s) {
for (size_t b = 0; b < 256; ++b) {