r26665: registry: Fix tests on bigendian machines.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 5 Jan 2008 19:59:53 +0000 (13:59 -0600)
committerStefan Metzmacher <metze@samba.org>
Sat, 5 Jan 2008 14:06:04 +0000 (08:06 -0600)
source/lib/registry/tests/hive.c

index bc3c82552efc9529f8473b4bcdc73f965a32ce82..36eea84d9404b6c78e40aab62321fd296abdff2e 100644 (file)
@@ -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);