* [lttng-dev] [PATCH babeltrace 1/1] Cleanup: test_bitfield: nr_bits should be unsigned
@ 2019-05-30 20:15 Mathieu Desnoyers
0 siblings, 0 replies; only message in thread
From: Mathieu Desnoyers @ 2019-05-30 20:15 UTC (permalink / raw)
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(-)
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)];
--
2.11.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-30 20:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 20:15 [lttng-dev] [PATCH babeltrace 1/1] Cleanup: test_bitfield: nr_bits should be unsigned Mathieu Desnoyers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox