s4:lib/registry/tests/registry.c - test recursive key generation
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Tue, 29 Jun 2010 16:27:49 +0000 (18:27 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 1 Jul 2010 13:48:05 +0000 (15:48 +0200)
source4/lib/registry/tests/registry.c

index 1bb20399a2b50541db6a5b0a6fec9b42cd79757b..3003468b15545f57981847036de0ab455a27beaa 100644 (file)
@@ -117,22 +117,17 @@ static bool test_create_subkey(struct torture_context *tctx, void *_data)
 static bool test_create_nested_subkey(struct torture_context *tctx, void *_data)
 {
        struct registry_context *rctx = (struct registry_context *)_data;
-       struct registry_key *root, *newkey1, *newkey2;
+       struct registry_key *root, *newkey;
        WERROR error;
 
        error = reg_get_predefined_key(rctx, HKEY_CLASSES_ROOT, &root);
        torture_assert_werr_ok(tctx, error,
                               "getting predefined key failed");
 
-       error = reg_key_add_name(rctx, root, "Hamburg", NULL, NULL,
-                                &newkey1);
-       torture_assert_werr_ok(tctx, error, "Creating key return code");
-       torture_assert(tctx, newkey1 != NULL, "Creating new key");
-
        error = reg_key_add_name(rctx, root, "Hamburg\\Hamburg", NULL, NULL,
-                                &newkey2);
+                                &newkey);
        torture_assert_werr_ok(tctx, error, "Creating key return code");
-       torture_assert(tctx, newkey2 != NULL, "Creating new key");
+       torture_assert(tctx, newkey != NULL, "Creating new key");
 
        return true;
 }