make style

This commit is contained in:
Philippe Teuwen committed 2025-10-14 09:50:59 +02:00
1 parent 9a0e6fbfac
commit fd88967443
22 files changed
+311 -311

No files matched your search

+2 -2
View File
@@ -63,8 +63,8 @@ typedef struct {
uint64_t current_key; // Use 64 bit and truncate when needed.
uint8_t mode;
uint8_t charset[
BF_CHARSET_DIGITS_SIZE
+ BF_CHARSET_UPPERCASE_SIZE
BF_CHARSET_DIGITS_SIZE
+ BF_CHARSET_UPPERCASE_SIZE
];
uint8_t charset_length;
+12 -12
View File
@@ -73,14 +73,14 @@
static const int Iso15693FrameSOF[] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-1, -1, -1, -1,
-1, -1, -1, -1,
1, 1, 1, 1,
1, 1, 1, 1
};
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-1, -1, -1, -1,
-1, -1, -1, -1,
1, 1, 1, 1,
1, 1, 1, 1
};
static const int Iso15693Logic0[] = {
1, 1, 1, 1,
1, 1, 1, 1,
@@ -89,10 +89,10 @@ static const int Iso15693Logic0[] = {
};
static const int Iso15693Logic1[] = {
-1, -1, -1, -1,
-1, -1, -1, -1,
1, 1, 1, 1,
1, 1, 1, 1
};
-1, -1, -1, -1,
1, 1, 1, 1,
1, 1, 1, 1
};
// EOF defined as
// 1) logic '0' (8 pulses of 423.75kHz followed by unmodulated for 18.88us)
+8 -8
View File
@@ -215,16 +215,16 @@ static const signed char indexes[2][4][20] = {
}, /* KL -> RK */
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1
}, /* KR -> RK */
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1
}, /* KR -> RK */
{
4, 5, 6, 7, 12, 13, 14, 15, 16, 17,
18, 19, -1, 24, 25, -1, 31, 28, 29, 30
}, /* KA -> RK */
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1
} /* KB -> RK */
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1
} /* KB -> RK */
},
{
{
@@ -233,12 +233,12 @@ static const signed char indexes[2][4][20] = {
}, /* KL -> RK */
{
-1, -1, -1, -1, 8, 9, 10, 11, 16, 17,
18, 19, -1, -1, -1, -1, 39, 36, 37, 38
}, /* KR -> RK */
18, 19, -1, -1, -1, -1, 39, 36, 37, 38
}, /* KR -> RK */
{
-1, -1, -1, -1, 12, 13, 14, 15, 58, 59,
56, 57, 31, 28, 29, 30, -1, -1, -1, -1
}, /* KA -> RK */
56, 57, 31, 28, 29, 30, -1, -1, -1, -1
}, /* KA -> RK */
{
4, 5, 6, 7, 65, 66, 67, 64, 20, 21,
22, 23, -1, -1, -1, -1, 43, 40, 41, 42
+1 -1
View File
@@ -119,7 +119,7 @@ void mbedtls_ctr_drbg_set_reseed_interval(mbedtls_ctr_drbg_context *ctx,
static int block_cipher_df(unsigned char *output,
const unsigned char *data, size_t data_len) {
unsigned char buf[MBEDTLS_CTR_DRBG_MAX_SEED_INPUT +
MBEDTLS_CTR_DRBG_BLOCKSIZE + 16];
MBEDTLS_CTR_DRBG_BLOCKSIZE + 16];
unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN];
unsigned char key[MBEDTLS_CTR_DRBG_KEYSIZE];
unsigned char chain[MBEDTLS_CTR_DRBG_BLOCKSIZE];
+8 -8
View File
@@ -86,7 +86,7 @@ static void debug_header(memory_header *hdr) {
#endif
mbedtls_fprintf(stderr, "HDR: PTR(%10zu), PREV(%10zu), NEXT(%10zu), "
"ALLOC(%zu), SIZE(%10zu)\n",
"ALLOC(%zu), SIZE(%10zu)\n",
(size_t) hdr, (size_t) hdr->prev, (size_t) hdr->next,
hdr->alloc, hdr->size);
mbedtls_fprintf(stderr, " FPREV(%10zu), FNEXT(%10zu)\n",
@@ -164,7 +164,7 @@ static int verify_chain(void) {
if (prv == NULL || verify_header(prv) != 0) {
#if defined(MBEDTLS_MEMORY_DEBUG)
mbedtls_fprintf(stderr, "FATAL: verification of first header "
"failed\n");
"failed\n");
#endif
return (1);
}
@@ -172,7 +172,7 @@ static int verify_chain(void) {
if (heap.first->prev != NULL) {
#if defined(MBEDTLS_MEMORY_DEBUG)
mbedtls_fprintf(stderr, "FATAL: verification failed: "
"first->prev != NULL\n");
"first->prev != NULL\n");
#endif
return (1);
}
@@ -183,7 +183,7 @@ static int verify_chain(void) {
if (verify_header(cur) != 0) {
#if defined(MBEDTLS_MEMORY_DEBUG)
mbedtls_fprintf(stderr, "FATAL: verification of header "
"failed\n");
"failed\n");
#endif
return (1);
}
@@ -191,7 +191,7 @@ static int verify_chain(void) {
if (cur->prev != prv) {
#if defined(MBEDTLS_MEMORY_DEBUG)
mbedtls_fprintf(stderr, "FATAL: verification failed: "
"cur->prev != prv\n");
"cur->prev != prv\n");
#endif
return (1);
}
@@ -243,7 +243,7 @@ static void *buffer_alloc_calloc(size_t n, size_t size) {
if (cur->alloc != 0) {
#if defined(MBEDTLS_MEMORY_DEBUG)
mbedtls_fprintf(stderr, "FATAL: block in free_list but allocated "
"data\n");
"data\n");
#endif
mbedtls_exit(1);
}
@@ -359,7 +359,7 @@ static void buffer_alloc_free(void *ptr) {
if (p < heap.buf || p >= heap.buf + heap.len) {
#if defined(MBEDTLS_MEMORY_DEBUG)
mbedtls_fprintf(stderr, "FATAL: mbedtls_free() outside of managed "
"space\n");
"space\n");
#endif
mbedtls_exit(1);
}
@@ -373,7 +373,7 @@ static void buffer_alloc_free(void *ptr) {
if (hdr->alloc != 1) {
#if defined(MBEDTLS_MEMORY_DEBUG)
mbedtls_fprintf(stderr, "FATAL: mbedtls_free() on unallocated "
"data\n");
"data\n");
#endif
mbedtls_exit(1);
}
+1 -1
View File
@@ -2101,7 +2101,7 @@ int mbedtls_x509_crt_verify_info(char *buf, size_t size, const char *prefix,
if (flags != 0) {
ret = mbedtls_snprintf(p, n, "%sUnknown reason "
"(this should not happen)\n", prefix);
"(this should not happen)\n", prefix);
MBEDTLS_X509_SAFE_SNPRINTF;
}