summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-05 13:59:53 -0600
committerStefan Metzmacher <metze@samba.org>2008-01-05 08:06:04 -0600
commitdf70180c0ff55a526cec997b6a9fc550cf2719d6 (patch)
tree643580a5d004b0a0f1f8251837fffac6e4ba4134 /source4/lib/registry/tests
parente15a33151cda5e1331d92daebfe698304e1252bc (diff)
downloadsamba-df70180c0ff55a526cec997b6a9fc550cf2719d6.tar.gz
samba-df70180c0ff55a526cec997b6a9fc550cf2719d6.tar.bz2
samba-df70180c0ff55a526cec997b6a9fc550cf2719d6.zip
r26665: registry: Fix tests on bigendian machines.
(This used to be commit bcd8f50f7952d1e502326f11ddfa8cfe8a982b1b)
Diffstat (limited to 'source4/lib/registry/tests')
-rw-r--r--source4/lib/registry/tests/hive.c8
1 files 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);