summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-04-17 08:02:46 -0700
committerJeremy Allison <jra@samba.org>2008-04-17 08:02:46 -0700
commit1c8553783515fa29b3af8499d9a36f92bdcf32cd (patch)
tree2e2e0ce3688a5de8d61cc534527a3b797c405c4a /source3/utils
parent3a6ece8c526e237376598ab8add68a605c148fe9 (diff)
downloadsamba-1c8553783515fa29b3af8499d9a36f92bdcf32cd.tar.gz
samba-1c8553783515fa29b3af8499d9a36f92bdcf32cd.tar.bz2
samba-1c8553783515fa29b3af8499d9a36f92bdcf32cd.zip
Fix gcc uninitialized variable used warning.
Jeremy. (This used to be commit b95f2adeb5e2f7ce71e46e6a6165159483c9a702)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc_samsync.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index 986499731a..06cde2a3fd 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -1028,7 +1028,6 @@ static NTSTATUS fetch_domain_info(uint32_t rid,
struct netr_DELTA_DOMAIN *r)
{
time_t u_max_age, u_min_age, u_logout;
- time_t u_lockoutreset, u_lockouttime;
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
const char *domname;
struct netr_AcctLockStr *lockstr = NULL;
@@ -1046,11 +1045,6 @@ static NTSTATUS fetch_domain_info(uint32_t rid,
u_min_age = uint64s_nt_time_to_unix_abs((uint64 *)&r->min_password_age);
u_logout = uint64s_nt_time_to_unix_abs((uint64 *)&r->force_logoff_time);
- if (lockstr) {
- u_lockoutreset = uint64s_nt_time_to_unix_abs(&lockstr->reset_count);
- u_lockouttime = uint64s_nt_time_to_unix_abs((uint64_t *)&lockstr->lockout_duration);
- }
-
domname = r->domain_name.string;
if (!domname) {
return NT_STATUS_NO_MEMORY;
@@ -1081,6 +1075,11 @@ static NTSTATUS fetch_domain_info(uint32_t rid,
return nt_status;
if (lockstr) {
+ time_t u_lockoutreset, u_lockouttime;
+
+ u_lockoutreset = uint64s_nt_time_to_unix_abs(&lockstr->reset_count);
+ u_lockouttime = uint64s_nt_time_to_unix_abs((uint64_t *)&lockstr->lockout_duration);
+
if (!pdb_set_account_policy(AP_BAD_ATTEMPT_LOCKOUT,
lockstr->bad_attempt_lockout))
return nt_status;