summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-10 14:12:25 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:42:53 +0100
commit0e3069186186ffed24269968d75c8f007900fd95 (patch)
tree57b996befe6bc47bfef1f0affb1849a5a5fb0e66 /source4/lib
parentbdf71f5dc676aaf9558d595abeece9c1b36eb28c (diff)
downloadsamba-0e3069186186ffed24269968d75c8f007900fd95.tar.gz
samba-0e3069186186ffed24269968d75c8f007900fd95.tar.bz2
samba-0e3069186186ffed24269968d75c8f007900fd95.zip
r25613: verify the length and type before checking the value,
hopefully gives more info why this fails some bigendian platforms metze (This used to be commit 1d2bc79aa5841bbdbaf003005a161bbf294c7366)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/tests/hive.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c
index 9e76ce6aa1..2ddfe6f036 100644
--- a/source4/lib/registry/tests/hive.c
+++ b/source4/lib/registry/tests/hive.c
@@ -187,10 +187,9 @@ static bool test_get_value(struct torture_context *tctx, const void *test_data)
error = hive_get_value(mem_ctx, subkey, "Answer", &type, &value);
torture_assert_werr_ok(tctx, error, "getting value");
- torture_assert(tctx, memcmp(value.data, &data, 4) == 0, "value 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");
return true;
}
@@ -251,10 +250,10 @@ static bool test_list_values(struct torture_context *tctx,
torture_assert_werr_ok(tctx, error, "getting value");
torture_assert_str_equal(tctx, name, "Answer", "value name");
- torture_assert(tctx, memcmp(value.data, &data, 4) == 0, "value 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");
error = hive_get_value_by_index(mem_ctx, subkey, 1, &name,
&type, &value);