1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-20 12:53:55 +08:00

libarchive: Use uint8_t instead of u_char

The latter is not a standard type.

Fixes: #22013
This commit is contained in:
Brad King
2021-04-05 10:04:38 -04:00
parent 63996cca04
commit a9fc751e65

View File

@@ -173,7 +173,7 @@ arc4_init(void)
} }
static inline void static inline void
arc4_addrandom(u_char *dat, int datlen) arc4_addrandom(uint8_t *dat, int datlen)
{ {
int n; int n;
uint8_t si; uint8_t si;
@@ -196,7 +196,7 @@ arc4_stir(void)
struct { struct {
struct timeval tv; struct timeval tv;
pid_t pid; pid_t pid;
u_char rnd[KEYSIZE]; uint8_t rnd[KEYSIZE];
} rdat; } rdat;
if (!rs_initialized) { if (!rs_initialized) {
@@ -216,7 +216,7 @@ arc4_stir(void)
/* We'll just take whatever was on the stack too... */ /* We'll just take whatever was on the stack too... */
} }
arc4_addrandom((u_char *)&rdat, KEYSIZE); arc4_addrandom((uint8_t *)&rdat, KEYSIZE);
/* /*
* Discard early keystream, as per recommendations in: * Discard early keystream, as per recommendations in:
@@ -258,7 +258,7 @@ arc4_getbyte(void)
static void static void
arc4random_buf(void *_buf, size_t n) arc4random_buf(void *_buf, size_t n)
{ {
u_char *buf = (u_char *)_buf; uint8_t *buf = (uint8_t *)_buf;
_ARC4_LOCK(); _ARC4_LOCK();
arc4_stir_if_needed(); arc4_stir_if_needed();
while (n--) { while (n--) {