mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-03 03:57:26 +02: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…
Reference in a new issue