diff --git a/source3/registry/reg_format.c b/source3/registry/reg_format.c index 06518e37807..15f63c7c06a 100644 --- a/source3/registry/reg_format.c +++ b/source3/registry/reg_format.c @@ -567,7 +567,9 @@ done: int reg_format_registry_key(struct reg_format* f, struct registry_key* key, bool del) { - return reg_format_key(f, (const char**)&key->key->name, 1, del); + const char *knames[1]; + knames[0] = key->key->name; + return reg_format_key(f, knames, 1, del); } int reg_format_registry_value(struct reg_format* f, const char* name,