Author: vlendec
Date: 2007-07-26 16:39:48 +0000 (Thu, 26 Jul 2007)
New Revision: 24057

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24057

Log:
Fix some uninitialized variables found by the IBM checker
Modified:
   branches/SAMBA_3_2/source/utils/net_rpc_registry.c


Changeset:
Modified: branches/SAMBA_3_2/source/utils/net_rpc_registry.c
===================================================================
--- branches/SAMBA_3_2/source/utils/net_rpc_registry.c  2007-07-26 16:01:12 UTC 
(rev 24056)
+++ branches/SAMBA_3_2/source/utils/net_rpc_registry.c  2007-07-26 16:39:48 UTC 
(rev 24057)
@@ -70,6 +70,8 @@
        NTSTATUS status;
        struct winreg_String key;
 
+       ZERO_STRUCT(key);
+
        if (!reg_hive_key(name, &hive, &key.name)) {
                return NT_STATUS_INVALID_PARAMETER;
        }
@@ -330,6 +332,8 @@
                return werror_to_ntstatus(err);
        }
 
+       ZERO_STRUCT(name_string);
+
        name_string.name = name;
        result = rpccli_winreg_SetValue(pipe_hnd, blob.data, key_hnd,
                                        name_string, value->type,
@@ -417,6 +421,8 @@
        NTSTATUS status;
        struct winreg_String valuename;
 
+       ZERO_STRUCT(valuename);
+
        status = registry_openkey(mem_ctx, pipe_hnd, argv[0], REG_KEY_WRITE,
                                  &hive_hnd, &key_hnd);
        if (!NT_STATUS_IS_OK(status)) {
@@ -467,6 +473,9 @@
        enum winreg_CreateAction action;
        NTSTATUS status;
 
+       ZERO_STRUCT(key);
+       ZERO_STRUCT(keyclass);
+
        if (!reg_hive_key(argv[0], &hive, &key.name)) {
                return NT_STATUS_INVALID_PARAMETER;
        }
@@ -533,6 +542,8 @@
        struct winreg_String key;
        NTSTATUS status;
 
+       ZERO_STRUCT(key);
+
        if (!reg_hive_key(argv[0], &hive, &key.name)) {
                return NT_STATUS_INVALID_PARAMETER;
        }

Reply via email to