]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_client: Direct struct initialization in dcerpc_winreg_enumvals()
authorVolker Lendecke <vl@samba.org>
Wed, 7 Apr 2021 15:44:35 +0000 (15:44 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 19 Apr 2021 18:18:31 +0000 (18:18 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_client/cli_winreg.c

index a51be3682b40ccccc73717dd19d7919fad1fc4f7..caace6bef9b8d713cce1e9d91a5af386e5f41e90 100644 (file)
@@ -717,7 +717,7 @@ NTSTATUS dcerpc_winreg_enumvals(TALLOC_CTX *mem_ctx,
        uint32_t secdescsize = 0;
        uint32_t i;
        NTTIME last_changed_time = 0;
-       struct winreg_String classname;
+       struct winreg_String classname = { .name = NULL };
 
        const char **enum_names = NULL;
        enum winreg_Type *enum_types = NULL;
@@ -735,8 +735,6 @@ NTSTATUS dcerpc_winreg_enumvals(TALLOC_CTX *mem_ctx,
                return status;
        }
 
-       ZERO_STRUCT(classname);
-
        status = dcerpc_winreg_QueryInfoKey(h,
                                            tmp_ctx,
                                            key_hnd,