1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

r25019: Fix coverity bug #105, run #332. Use of uninitialized variable.

Jeremy.
(This used to be commit a58de8cee51c1396a2607ee743c92d58d7703547)
This commit is contained in:
Jeremy Allison 2007-09-08 04:45:59 +00:00 committed by Gerald (Jerry) Carter
parent 62e3caf0fe
commit fc213876d5

View File

@ -362,7 +362,8 @@ static int net_sam_set(int argc, const char **argv)
static int net_sam_policy_set(int argc, const char **argv)
{
const char *account_policy = NULL;
uint32 value, old_value;
uint32 value = 0;
uint32 old_value = 0;
int field;
char *endptr;
@ -409,19 +410,20 @@ static int net_sam_policy_set(int argc, const char **argv)
if (!pdb_get_account_policy(field, &old_value)) {
d_fprintf(stderr, "Valid account policy, but unable to fetch "
"value!\n");
} else {
d_printf("Account policy \"%s\" value was: %d\n", account_policy,
old_value);
}
if (!pdb_set_account_policy(field, value)) {
d_fprintf(stderr, "Valid account policy, but unable to "
"set value!\n");
return -1;
} else {
d_printf("Account policy \"%s\" value is now: %d\n", account_policy,
value);
}
d_printf("Account policy \"%s\" value was: %d\n", account_policy,
old_value);
d_printf("Account policy \"%s\" value is now: %d\n", account_policy,
value);
return 0;
}