]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
Use unsigned int in preference to unsigned
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 23 Jun 2017 15:28:16 +0000 (16:28 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 23 Jun 2017 15:28:16 +0000 (16:28 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/hvm/traps.c
arch/x86/include/arch/desc.h
common/libc/vsnprintf.c
include/xtf/hypercall.h
tests/xsa-122/main.c

index 17ca66e24ddc110bfacd0d76e8657b65351c3939..899b686c26145474ca712a1338e083a26cd496c7 100644 (file)
@@ -65,8 +65,8 @@ static env_tss tss_DF __aligned(16) =
 };
 #endif
 
-void pack_gate32(struct seg_gate32 *gate, unsigned type, uint32_t func,
-                 unsigned dpl, unsigned seg)
+void pack_gate32(struct seg_gate32 *gate, unsigned int type, uint32_t func,
+                 unsigned int dpl, unsigned int seg)
 {
     gate->offset0 = func & 0xffff;
     gate->selector = seg;
@@ -78,8 +78,8 @@ void pack_gate32(struct seg_gate32 *gate, unsigned type, uint32_t func,
     gate->offset1 = (func >> 16) & 0xffff;
 }
 
-void pack_gate64(struct seg_gate64 *gate, unsigned type, uint64_t func,
-                 unsigned dpl, unsigned ist, unsigned seg)
+void pack_gate64(struct seg_gate64 *gate, unsigned int type, uint64_t func,
+                 unsigned int dpl, unsigned int ist, unsigned int seg)
 {
     gate->offset0 = func & 0xffff;
     gate->selector = seg;
index 0babdce514a2e6847b18482dcfbc19e2a6e31e0b..6991a682bb35d6e3b451085c62f8d5f4c2249328 100644 (file)
@@ -66,7 +66,7 @@ struct __packed seg_gate32 {
             uint16_t offset0;
             uint16_t selector;
             uint8_t  _r0;
-            unsigned type: 4, s: 1, dpl: 2, p: 1;
+            unsigned int type: 4, s: 1, dpl: 2, p: 1;
             uint16_t offset1;
         };
     };
@@ -81,7 +81,7 @@ struct __packed seg_gate64 {
         struct {
             uint16_t offset0;
             uint16_t selector;
-            unsigned ist: 3, _r0: 5, type: 4, s: 1, dpl: 2, p: 1;
+            unsigned int ist: 3, _r0: 5, type: 4, s: 1, dpl: 2, p: 1;
             uint16_t offset1;
             uint32_t offset2;
             uint32_t _r1;
index 19314333853899fbb624b171d58637dfb71cb5e1..a3c2acfc4346e86125fdc6a8a60eb411666e0e21 100644 (file)
@@ -69,8 +69,8 @@ static int fmt_int(const char **fmt)
     return res;
 }
 
-static char *number(char *str, char *end, long long val, unsigned base,
-                    int width, int precision, unsigned flags)
+static char *number(char *str, char *end, long long val, unsigned int base,
+                    int width, int precision, unsigned int flags)
 {
     static const char lower[] = "0123456789abcdef";
     static const char upper[] = "0123456789ABCDEF";
@@ -245,7 +245,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
         const char *spec_start = fmt; /* For rewinding on error. */
 
         unsigned long long num;
-        unsigned base, flags = 0;
+        unsigned int base, flags = 0;
         int width = -1, precision = -1;
         char length_mod = 'i';
 
index cb33fa6be20f3351cee082667040fcf5db26a639..63c16f3ec1ac90e3dd9b7d6e384f68fc81d21ae0 100644 (file)
@@ -67,7 +67,7 @@ static inline long hypercall_memory_op(unsigned int cmd, void *arg)
     return HYPERCALL2(long, __HYPERVISOR_memory_op, cmd, arg);
 }
 
-static inline long hypercall_xen_version(unsigned cmd, void *arg)
+static inline long hypercall_xen_version(unsigned int cmd, void *arg)
 {
     return HYPERCALL2(long, __HYPERVISOR_xen_version, cmd, arg);
 }
index 39987e06be61db303f1d4c22d09a1d05649f078e..ff8a12df9e76fab8ff8a7b508d4ebc65fe891904 100644 (file)
@@ -30,7 +30,7 @@ const char test_title[] = "XSA-122 PoC";
  */
 static void check_buffer(const char *ref, const char *buf, size_t buf_sz)
 {
-    unsigned i;
+    unsigned int i;
     size_t str_len = strnlen(buf, buf_sz);
 
     if ( str_len == buf_sz )