From 01f1f87aa91e8a887a6405ead2e96d6a659c4ec0 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Tue, 30 Mar 2010 13:02:27 +0200 Subject: s4:registry/tests/diff.c - try to make also this test compatible with big-endian platforms --- source4/lib/registry/tests/diff.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/lib/registry/tests/diff.c') diff --git a/source4/lib/registry/tests/diff.c b/source4/lib/registry/tests/diff.c index 3dba7293bc..4241ab5ee2 100644 --- a/source4/lib/registry/tests/diff.c +++ b/source4/lib/registry/tests/diff.c @@ -227,10 +227,11 @@ static bool diff_setup_tcase(struct torture_context *tctx, void **data) error = r2_ctx->ops->create_key(r2_ctx, newkey, "Explorer", NULL, NULL, &newkey); torture_assert_werr_ok(tctx, error, "Creating HKLM\\..\\Policies\\Explorer failed"); - - blob.data = (void *)talloc(r2_ctx, uint32_t); - SIVAL(blob.data, 0, 0x03ffffff); - blob.length = sizeof(uint32_t); + blob.data = talloc_array(r2_ctx, uint8_t, 4); + /* set "0x03FFFFFF" in little endian format */ + blob.data[0] = 0xFF; blob.data[1] = 0xFF; + blob.data[2] = 0xFF; blob.data[3] = 0x03; + blob.length = 4; r1_ctx->ops->set_value(newkey, "NoDrives", REG_DWORD, blob); -- cgit