Skip to contentSkip to conversation

tools/virtio: use 'unsigned int' instead of bare 'unsigned'

PATCH In review Jason Wang 2 participants 2 messages Jul 29, 2021 – Aug 5, 2021 virtio core

lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH 1/1 tools/virtio: use 'unsigned int' instead of bare 'unsigned'

Replace the lazy way 'unsigned' with 'unsigned int' which is more accurate.

---
 tools/virtio/vringh_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/virtio/vringh_test.c +2 -2
index fa87b58bd5fa..3e85f4ec210d 100644
@@ -447,7 +447,7 @@ int main(int argc, char *argv[])
 	char buf[28];
 	u16 head;
 	int err;
-	unsigned i;
+	unsigned int i;
 	void *ret;
 	bool (*getrange)(struct vringh *vrh, u64 addr, struct vringh_range *r);
 	bool fast_vringh = false, parallel = false;
@@ -654,7 +654,7 @@ int main(int argc, char *argv[])
 
 	/* Free those buffers. */
 	for (i = 0; i < RINGSIZE; i++) {
-		unsigned len;
+		unsigned int len;
 		assert(virtqueue_get_buf(vq, &len) != NULL);
 	}
 
Signature · 1 line
2.32.0
#1 lore raw
Quoted 4 lines · Jason Wang

Replace the lazy way 'unsigned' with 'unsigned int' which is more accurate.

I don't see why this is more accurate. AFAIK it's exactly the same.

Quoted 28 lines
---
 tools/virtio/vringh_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/virtio/vringh_test.c +2 -2
index fa87b58bd5fa..3e85f4ec210d 100644
@@ -447,7 +447,7 @@ int main(int argc, char *argv[])
 	char buf[28];
 	u16 head;
 	int err;
-	unsigned i;
+	unsigned int i;
 	void *ret;
 	bool (*getrange)(struct vringh *vrh, u64 addr, struct vringh_range *r);
 	bool fast_vringh = false, parallel = false;
@@ -654,7 +654,7 @@ int main(int argc, char *argv[])
 
 	/* Free those buffers. */
 	for (i = 0; i < RINGSIZE; i++) {
-		unsigned len;
+		unsigned int len;
 		assert(virtqueue_get_buf(vq, &len) != NULL);
 	}
 
Signature · 1 line
2.32.0