]> git.proxmox.com Git - mirror_qemu.git/commitdiff
fpu: Replace uint8 typedef with uint8_t
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 22 Jan 2016 15:09:21 +0000 (15:09 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 22 Jan 2016 15:09:21 +0000 (15:09 +0000)
Replace the uint8 softfloat-specific typedef with uint8_t.
This change was made with

find include hw fpu target-* -name '*.[ch]' | xargs sed -i -e 's/\buint8\b/uint8_t/g'

together with manual removal of the typedef definition and
manual fixing of more erroneous uses found via test compilation.

It turns out that the only code using this type is an accidental
use where uint8_t was intended anyway...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Leon Alrae <leon.alrae@imgtec.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Message-id: 1452603315-27030-7-git-send-email-peter.maydell@linaro.org

crypto/secret.c
hw/net/vmware_utils.h
include/fpu/softfloat.h
migration/ram.c

index 9a9257a7f00f4df2aa25256ab0c331c5226308a4..a799da1bdb91d650fcfae2e425c2f8f5537dbadc 100644 (file)
@@ -434,7 +434,7 @@ int qcrypto_secret_lookup(const char *secretid,
         return -1;
     }
 
-    *data = g_new0(uint8, secret->rawlen + 1);
+    *data = g_new0(uint8_t, secret->rawlen + 1);
     memcpy(*data, secret->rawdata, secret->rawlen);
     (*data)[secret->rawlen] = '\0';
     *datalen = secret->rawlen;
index c2c2f900faf322ea7f42611d68d1052c61fe8189..c0dbb2ff41106a2b089c43efca330753f737605b 100644 (file)
@@ -49,7 +49,7 @@ vmw_shmem_rw(hwaddr addr, void *buf, int len, int is_write)
 }
 
 static inline void
-vmw_shmem_set(hwaddr addr, uint8 val, int len)
+vmw_shmem_set(hwaddr addr, uint8_t val, int len)
 {
     int i;
     VMW_SHPRN("SHMEM set: %" PRIx64 ", len: %d (value 0x%X)", addr, len, val);
index a6842ad21d05ccf175c9326fa06c85d1b4d09d7b..575a7398cf2cf77fae154ddf9d9a1cbbc1561773 100644 (file)
@@ -90,16 +90,11 @@ this code that are retained.
 #include "config-host.h"
 #include "qemu/osdep.h"
 
-/*----------------------------------------------------------------------------
-| Each of the following `typedef's defines the most convenient type that holds
-| integers of at least as many bits as specified.  For example, `uint8' should
-| be the most convenient type that can hold unsigned integers of as many as
-| 8 bits.  The `flag' type must be able to hold either a 0 or 1.  For most
-| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
-| to the same as `int'.
-*----------------------------------------------------------------------------*/
+/* This 'flag' type must be able to hold at least 0 and 1. It should
+ * probably be replaced with 'bool' but the uses would need to be audited
+ * to check that they weren't accidentally relying on it being a larger type.
+ */
 typedef uint8_t flag;
-typedef uint8_t uint8;
 
 #define LIT64( a ) a##LL
 
index 4e606ab1a40fdf6b0cab52a9a29fd3d66fb32fe9..e49749d03d87f3a6e4834b45a229c35ba04d952c 100644 (file)
@@ -265,7 +265,7 @@ struct DecompressParam {
     QemuMutex mutex;
     QemuCond cond;
     void *des;
-    uint8 *compbuf;
+    uint8_t *compbuf;
     int len;
 };
 typedef struct DecompressParam DecompressParam;