registry: Fix warning.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 9 Feb 2008 16:18:51 +0000 (17:18 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 9 Feb 2008 16:18:51 +0000 (17:18 +0100)
(This used to be commit dad809030478a85ac13a73bce9c07314792f01c2)

source4/lib/registry/ldb.c

index 262859f64b4302395d04cf41f0d0e47b27a4cde1..0c8a55396ee553e15e072f67d3cdb5ab5dab38c3 100644 (file)
@@ -400,7 +400,7 @@ static WERROR ldb_add_key(TALLOC_CTX *mem_ctx, const struct hive_key *parent,
                          struct security_descriptor *sd,
                          struct hive_key **newkey)
 {
-       struct ldb_key_data *parentkd = (const struct ldb_key_data *)parent;
+       struct ldb_key_data *parentkd = discard_const_p(struct ldb_key_data, parent);
        struct ldb_message *msg;
        struct ldb_key_data *newkd;
        int ret;