]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Use uint8_t instead of u_char 1522/head
authorBrad King <brad.king@kitware.com>
Mon, 5 Apr 2021 14:10:48 +0000 (10:10 -0400)
committerBrad King <brad.king@kitware.com>
Mon, 5 Apr 2021 14:10:48 +0000 (10:10 -0400)
The latter is not a standard type.

libarchive/archive_random.c

index 65ea6915768d4ba76d4d6875b7dc328a211da709..9d1aa493f0c8f5855671971921318fb29a7e8856 100644 (file)
@@ -173,7 +173,7 @@ arc4_init(void)
 }
 
 static inline void
-arc4_addrandom(u_char *dat, int datlen)
+arc4_addrandom(uint8_t *dat, int datlen)
 {
        int     n;
        uint8_t si;
@@ -196,7 +196,7 @@ arc4_stir(void)
        struct {
                struct timeval  tv;
                pid_t           pid;
-               u_char          rnd[KEYSIZE];
+               uint8_t         rnd[KEYSIZE];
        } rdat;
 
        if (!rs_initialized) {
@@ -216,7 +216,7 @@ arc4_stir(void)
                /* 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:
@@ -258,7 +258,7 @@ arc4_getbyte(void)
 static void
 arc4random_buf(void *_buf, size_t n)
 {
-       u_char *buf = (u_char *)_buf;
+       uint8_t *buf = (uint8_t *)_buf;
        _ARC4_LOCK();
        arc4_stir_if_needed();
        while (n--) {