[babeltrace,1/1] Cleanup: test_bitfield: nr_bitsshould be unsigned
diff mbox series

Message ID 20190530201522.29931-1-mathieu.desnoyers@efficios.com
State New
Headers show
Series
  • [babeltrace,1/1] Cleanup: test_bitfield: nr_bitsshould be unsigned
Related show

Commit Message

Mathieu Desnoyers May 30, 2019, 8:15 p.m. UTC
Should not have any effect on the code behavior, but removes
useless type conversions between unsigned and signed types.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Change-Id: I39096ab89936875009a68d3ab8a4546c7f1eb8ae
---
 tests/lib/test_bitfield.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/tests/lib/test_bitfield.c b/tests/lib/test_bitfield.c
index 05547c07..9e9a52ad 100644
--- a/tests/lib/test_bitfield.c
+++ b/tests/lib/test_bitfield.c
@@ -380,7 +380,7 @@  void run_test_unsigned(unsigned int src_ui, unsigned long long src_ull)
 
 void run_test_signed_write(int src_i, long long src_ll)
 {
-	int nrbits_i, nrbits_ll;
+	unsigned int nrbits_i, nrbits_ll;
 	union {
 		signed char c[TEST_LEN];
 		short s[TEST_LEN/sizeof(short)];
@@ -500,7 +500,8 @@  void run_test_signed_write(int src_i, long long src_ll)
 
 void run_test_signed_read(int src_i, long long src_ll)
 {
-	int nrbits_i, nrbits_ll, readval_i;
+	unsigned int nrbits_i, nrbits_ll;
+	int readval_i;
 	union {
 		unsigned char c[TEST_LEN];
 		unsigned short s[TEST_LEN/sizeof(unsigned short)];