summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/tests')
-rw-r--r--source4/lib/registry/tests/hive.c24
-rw-r--r--source4/lib/registry/tests/registry.c51
2 files changed, 46 insertions, 29 deletions
diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c
index a04bc1168e..a71e31474c 100644
--- a/source4/lib/registry/tests/hive.c
+++ b/source4/lib/registry/tests/hive.c
@@ -31,9 +31,9 @@ NTSTATUS torture_temp_dir(struct torture_context *tctx, const char *prefix,
const char **tempdir);
static bool test_del_nonexistant_key(struct torture_context *tctx,
- const void *test_data)
+ const void *test_data)
{
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
WERROR error = hive_key_del(root, "bla");
torture_assert_werr_equal(tctx, error, WERR_NOT_FOUND,
"invalid return code");
@@ -45,7 +45,7 @@ static bool test_keyinfo_root(struct torture_context *tctx,
const void *test_data)
{
uint32_t num_subkeys, num_values;
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
WERROR error;
/* This is a new backend. There should be no subkeys and no
@@ -67,7 +67,7 @@ static bool test_keyinfo_nums(struct torture_context *tctx,
const void *test_data)
{
uint32_t num_subkeys, num_values;
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
WERROR error;
struct hive_key *subkey;
uint32_t data = 42;
@@ -100,7 +100,7 @@ static bool test_add_subkey(struct torture_context *tctx,
{
WERROR error;
struct hive_key *subkey;
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
TALLOC_CTX *mem_ctx = tctx;
error = hive_key_add_name(mem_ctx, root, "Nested Key", NULL,
@@ -114,9 +114,9 @@ static bool test_add_subkey(struct torture_context *tctx,
}
static bool test_flush_key(struct torture_context *tctx,
- const void *test_data)
+ const void *test_data)
{
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
torture_assert_werr_ok(tctx, hive_key_flush(root), "flush key");
@@ -127,7 +127,7 @@ static bool test_del_key(struct torture_context *tctx, const void *test_data)
{
WERROR error;
struct hive_key *subkey;
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
TALLOC_CTX *mem_ctx = tctx;
error = hive_key_add_name(mem_ctx, root, "Nested Key", NULL,
@@ -148,7 +148,7 @@ static bool test_set_value(struct torture_context *tctx,
{
WERROR error;
struct hive_key *subkey;
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
TALLOC_CTX *mem_ctx = tctx;
uint32_t data = 42;
@@ -167,7 +167,7 @@ static bool test_get_value(struct torture_context *tctx, const void *test_data)
{
WERROR error;
struct hive_key *subkey;
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
TALLOC_CTX *mem_ctx = tctx;
uint32_t data = 42;
uint32_t type;
@@ -200,7 +200,7 @@ static bool test_del_value(struct torture_context *tctx, const void *test_data)
{
WERROR error;
struct hive_key *subkey;
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
TALLOC_CTX *mem_ctx = tctx;
uint32_t data = 42;
uint32_t type;
@@ -231,7 +231,7 @@ static bool test_list_values(struct torture_context *tctx,
{
WERROR error;
struct hive_key *subkey;
- const struct hive_key *root = test_data;
+ const struct hive_key *root = (const struct hive_key *)test_data;
TALLOC_CTX *mem_ctx = tctx;
uint32_t data = 42;
uint32_t type;
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c
index 9ac61b1bc0..9809a6d4c8 100644
--- a/source4/lib/registry/tests/registry.c
+++ b/source4/lib/registry/tests/registry.c
@@ -37,7 +37,8 @@ NTSTATUS torture_temp_dir(struct torture_context *tctx, const char *prefix,
static bool test_get_predefined(struct torture_context *tctx,
const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root;
WERROR error;
@@ -66,7 +67,8 @@ static bool test_get_predefined_unknown(struct torture_context *tctx,
static bool test_predef_key_by_name(struct torture_context *tctx,
const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root;
WERROR error;
@@ -84,7 +86,8 @@ static bool test_predef_key_by_name(struct torture_context *tctx,
static bool test_predef_key_by_name_invalid(struct torture_context *tctx,
const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root;
WERROR error;
@@ -100,7 +103,8 @@ static bool test_predef_key_by_name_invalid(struct torture_context *tctx,
static bool test_create_subkey(struct torture_context *tctx,
const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root, *newkey;
WERROR error;
@@ -121,7 +125,8 @@ static bool test_create_subkey(struct torture_context *tctx,
static bool test_create_nested_subkey(struct torture_context *tctx,
const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root, *newkey1, *newkey2;
WERROR error;
@@ -148,7 +153,8 @@ static bool test_create_nested_subkey(struct torture_context *tctx,
static bool test_key_add_abs_top(struct torture_context *tctx,
const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root;
WERROR error;
@@ -165,7 +171,8 @@ static bool test_key_add_abs(struct torture_context *tctx,
const void *_data)
{
WERROR error;
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root, *result1, *result2;
error = reg_key_add_abs(tctx, rctx, "HKEY_CLASSES_ROOT\\bloe", 0, NULL, &result1);
@@ -190,7 +197,8 @@ static bool test_key_add_abs(struct torture_context *tctx,
static bool test_del_key(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root, *newkey;
WERROR error;
@@ -238,7 +246,8 @@ static bool create_test_key(struct torture_context *tctx,
static bool test_flush_key(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root, *subkey;
WERROR error;
@@ -256,7 +265,8 @@ static bool test_flush_key(struct torture_context *tctx, const void *_data)
static bool test_query_key(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root, *subkey;
WERROR error;
NTTIME last_changed_time;
@@ -280,7 +290,8 @@ static bool test_query_key(struct torture_context *tctx, const void *_data)
static bool test_query_key_nums(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *root, *subkey1, *subkey2;
WERROR error;
uint32_t num_subkeys, num_values;
@@ -313,7 +324,8 @@ static bool test_query_key_nums(struct torture_context *tctx, const void *_data)
*/
static bool test_list_subkeys(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *subkey = NULL, *root;
WERROR error;
NTTIME last_mod_time;
@@ -351,7 +363,8 @@ static bool test_list_subkeys(struct torture_context *tctx, const void *_data)
*/
static bool test_set_value(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *subkey = NULL, *root;
WERROR error;
uint32_t data = 42;
@@ -371,7 +384,8 @@ static bool test_set_value(struct torture_context *tctx, const void *_data)
*/
static bool test_security(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *subkey = NULL, *root;
WERROR error;
struct security_descriptor *osd, *nsd;
@@ -404,7 +418,8 @@ static bool test_security(struct torture_context *tctx, const void *_data)
*/
static bool test_get_value(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *subkey = NULL, *root;
WERROR error;
DATA_BLOB data;
@@ -439,7 +454,8 @@ static bool test_get_value(struct torture_context *tctx, const void *_data)
*/
static bool test_del_value(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *subkey = NULL, *root;
WERROR error;
DATA_BLOB data;
@@ -473,7 +489,8 @@ static bool test_del_value(struct torture_context *tctx, const void *_data)
*/
static bool test_list_values(struct torture_context *tctx, const void *_data)
{
- const struct registry_context *rctx = _data;
+ const struct registry_context *rctx =
+ (const struct registry_context *)_data;
struct registry_key *subkey = NULL, *root;
WERROR error;
DATA_BLOB data;