summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-26 16:39:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:00 -0500
commit6e419551ae06abff4b19abb6ceb1978f8c58e353 (patch)
treedd4fe0a1174fd5ae47c971dbe8e0547094bf2b62 /source3/utils
parent7d2d4ddfa2fbd859f35f8f4e2b8243f52a4ace0e (diff)
downloadsamba-6e419551ae06abff4b19abb6ceb1978f8c58e353.tar.gz
r24057: Fix some uninitialized variables found by the IBM checker
(This used to be commit d74bbc53c2cf41e7e92309e81bb9c1b3f805cdd1)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc_registry.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index aac49dd7f90..0d54ff39073 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -70,6 +70,8 @@ static NTSTATUS registry_openkey(TALLOC_CTX *mem_ctx,
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 @@ static NTSTATUS registry_setvalue(TALLOC_CTX *mem_ctx,
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 @@ static NTSTATUS rpc_registry_deletevalue_internal(const DOM_SID *domain_sid,
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 @@ static NTSTATUS rpc_registry_createkey_internal(const DOM_SID *domain_sid,
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 @@ static NTSTATUS rpc_registry_deletekey_internal(const DOM_SID *domain_sid,
struct winreg_String key;
NTSTATUS status;
+ ZERO_STRUCT(key);
+
if (!reg_hive_key(argv[0], &hive, &key.name)) {
return NT_STATUS_INVALID_PARAMETER;
}