reduce the local scope of variable
This commit is contained in:
parent
655ef53749
commit
3b60891bf8
|
@ -641,14 +641,13 @@ func (s *Store) aclPolicySetTxn(tx *memdb.Txn, idx uint64, policy *structs.ACLPo
|
|||
return ErrMissingACLPolicyName
|
||||
}
|
||||
|
||||
var policyMatch *structs.ACLPolicy
|
||||
existing, err := tx.First("acl-policies", "id", policy.ID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed acl policy lookup: %v", err)
|
||||
}
|
||||
|
||||
if existing != nil {
|
||||
policyMatch = existing.(*structs.ACLPolicy)
|
||||
policyMatch := existing.(*structs.ACLPolicy)
|
||||
|
||||
if policy.ID == structs.ACLPolicyGlobalManagementID {
|
||||
// Only the name and description are modifiable
|
||||
|
|
Loading…
Reference in New Issue