Skip to content

Commit fd93bd8

Browse files
committed
tests: make utiltest:t_cmp_guid succeed on s390x
memcmp was given the wrong buffer to check for byteorder. Fixes: gromox-2.4-47-g3acd4a722
1 parent dd94271 commit fd93bd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/utiltest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,13 @@ static int t_cmp_guid()
311311
ep.init(buf, sizeof(buf), 0);
312312
if (ep.p_guid(PSETID_Address) != pack_result::success)
313313
return EXIT_FAILURE;
314-
assert(memcmp(&PSETID_Address, "\x04\x20\x06\x00", 4) == 0);
314+
assert(memcmp(ep.m_udata, "\x04\x20\x06\x00", 4) == 0);
315315
static_assert(std::is_same_v<decltype(PSETID_Address), const GUID>);
316316

317317
ep.init(buf, sizeof(buf), 0);
318318
if (ep.p_guid(muidEMSAB) != EXT_ERR_SUCCESS)
319319
return EXIT_FAILURE;
320-
assert(memcmp(&muidEMSAB, "\xDC\xA7\x40\xC8", 4) == 0);
320+
assert(memcmp(ep.m_udata, "\xDC\xA7\x40\xC8", 4) == 0);
321321
static_assert(std::is_same_v<decltype(muidEMSAB), const FLATUID>);
322322
return EXIT_SUCCESS;
323323
}

0 commit comments

Comments
 (0)