mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-01 13:13:28 +00:00
Rewrite nibble_to_hex_digit for readability
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
parent
9d2507c81d
commit
f0e1ac59d8
@ -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');
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user