Fix warnings

This commit is contained in:
Preetha Appan
2018-07-17 18:10:54 -05:00
parent fd697272a7
commit e2ce63e489
2 changed files with 2 additions and 2 deletions

View File

@@ -5431,7 +5431,7 @@ func (s *Spread) String() string {
if s.str != "" {
return s.str
}
s.str = fmt.Sprintf("%s %s %v", s.Attribute, s.Weight, s.SpreadTarget)
s.str = fmt.Sprintf("%s %s %v", s.Attribute, s.SpreadTarget, s.Weight)
return s.str
}

View File

@@ -75,7 +75,7 @@ func (p *propertySet) SetTGConstraint(constraint *structs.Constraint, taskGroup
// setConstraint is a shared helper for setting a job or task group constraint.
func (p *propertySet) setConstraint(constraint *structs.Constraint, taskGroup string) {
allowedCount := uint64(0)
var allowedCount uint64
// Determine the number of allowed allocations with the property.
if v := constraint.RTarget; v != "" {
c, err := strconv.ParseUint(v, 10, 64)