From df70180c0ff55a526cec997b6a9fc550cf2719d6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 5 Jan 2008 13:59:53 -0600 Subject: r26665: registry: Fix tests on bigendian machines. (This used to be commit bcd8f50f7952d1e502326f11ddfa8cfe8a982b1b) --- source4/lib/registry/tests/hive.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c index bc3c82552e..36eea84d94 100644 --- a/source4/lib/registry/tests/hive.c +++ b/source4/lib/registry/tests/hive.c @@ -186,7 +186,9 @@ static bool test_get_value(struct torture_context *tctx, const void *test_data) torture_assert_int_equal(tctx, value.length, 4, "value length"); torture_assert_int_equal(tctx, type, REG_DWORD, "value type"); - torture_assert(tctx, memcmp(value.data, &data, 4) == 0, "value data"); + + torture_assert_int_equal(tctx, data, IVAL(value.data, 0), + "value data"); return true; } @@ -250,7 +252,9 @@ static bool test_list_values(struct torture_context *tctx, torture_assert_int_equal(tctx, value.length, 4, "value length"); torture_assert_int_equal(tctx, type, REG_DWORD, "value type"); - torture_assert(tctx, memcmp(value.data, &data, 4) == 0, "value data"); + + + torture_assert_int_equal(tctx, data, IVAL(value.data, 0), "value data"); error = hive_get_value_by_index(mem_ctx, subkey, 1, &name, &type, &value); -- cgit