Cleanup: test_bitfield: nr_bits should be unsigned
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 30 May 2019 20:15:22 +0000 (16:15 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 6 Jun 2019 17:47:29 +0000 (13:47 -0400)
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@efficios.com>
Change-Id: I39096ab89936875009a68d3ab8a4546c7f1eb8ae
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1375
CI-Build: Michael Jeanson <mjeanson@efficios.com>
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/lib/test_bitfield.c

index 05547c07d07bc9b135ca3d9a24d6bd5798c93ebb..9e9a52ad09122cd5aa1b6c24da185c7733b56a0a 100644 (file)
@@ -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)];
This page took 0.024679 seconds and 4 git commands to generate.