1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

Rewrite nibble_to_hex_digit for readability

Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
Agathiyan Bragadeesh
2023-07-24 16:43:36 +01:00
parent 9d2507c81d
commit f0e1ac59d8

View File

@@ -812,7 +812,7 @@ int mbedtls_x509_get_ext(unsigned char **p, const unsigned char *end,
static char nibble_to_hex_digit(int i)
{
return (i < 10) ? (i | 0x30) : ((i - 9) | 0x40);
return (i < 10) ? (i + '0') : (i - 10 + 'A');
}
/*