Use standard unsigned integer types

This commit is contained in:
Andreas Steffen
2016-03-24 18:52:48 +01:00
parent b210369314
commit b12c53ce77
584 changed files with 3430 additions and 3430 deletions
+9 -9
View File
@@ -121,9 +121,9 @@ END_TEST
START_TEST(test_htoun)
{
chunk_t net64, expected;
u_int16_t host16 = 513;
u_int32_t net16 = 0, host32 = 67305985;
u_int64_t net32 = 0, host64 = 578437695752307201ULL;
uint16_t host16 = 513;
uint32_t net16 = 0, host32 = 67305985;
uint64_t net32 = 0, host64 = 578437695752307201ULL;
net64 = chunk_alloca(16);
memset(net64.ptr, 0, net64.len);
@@ -133,14 +133,14 @@ START_TEST(test_htoun)
ck_assert(chunk_equals(expected, chunk_from_thing(net16)));
expected = chunk_from_chars(0x00, 0x00, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00);
htoun32((u_int16_t*)&net32 + 1, host32);
htoun32((uint16_t*)&net32 + 1, host32);
ck_assert(chunk_equals(expected, chunk_from_thing(net32)));
expected = chunk_from_chars(0x00, 0x00, 0x00, 0x00,
0x08, 0x07, 0x06, 0x05,
0x04, 0x03, 0x02, 0x01,
0x00, 0x00, 0x00, 0x00);
htoun64((u_int32_t*)net64.ptr + 1, host64);
htoun64((uint32_t*)net64.ptr + 1, host64);
ck_assert(chunk_equals(expected, net64));
}
END_TEST
@@ -148,9 +148,9 @@ END_TEST
START_TEST(test_untoh)
{
chunk_t net;
u_int16_t host16;
u_int32_t host32;
u_int64_t host64;
uint16_t host16;
uint32_t host32;
uint64_t host64;
net = chunk_from_chars(0x00, 0x02, 0x01, 0x00);
host16 = untoh16(net.ptr + 1);
@@ -308,7 +308,7 @@ END_TEST
START_TEST(test_memxor_aligned)
{
u_int64_t a = 0, b = 0;
uint64_t a = 0, b = 0;
chunk_t ca, cb;
int i;