mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 02:57:14 +08:00
cpukit/libcrypt/misc.c: Conditionally correct 16-bit unclean code
This commit is contained in:
@@ -52,7 +52,11 @@ b64_from_24bit(uint8_t B2, uint8_t B1, uint8_t B0, int n, int *buflen, char **cp
|
||||
uint32_t w;
|
||||
int i;
|
||||
|
||||
#if defined(__rtems__)
|
||||
w = (B2 << 16) | (B1 << 8) | B0;
|
||||
#else
|
||||
w = ((uint32_t)B2 << 16) | ((uint32_t)B1 << 8) | B0;
|
||||
#endif
|
||||
for (i = 0; i < n; i++) {
|
||||
**cp = itoa64[w&0x3f];
|
||||
(*cp)++;
|
||||
|
||||
Reference in New Issue
Block a user