Fix a couple of code scanning alerts (#5157)
This PR fixed a couple of code scanning alerts: Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
69473c5cad
commit
041e1eabc6
2 changed files with 2 additions and 5 deletions
|
@ -163,13 +163,10 @@ func parseBlock(c *caddy.Controller, f *Forward) error {
|
|||
if !c.NextArg() {
|
||||
return c.ArgErr()
|
||||
}
|
||||
n, err := strconv.Atoi(c.Val())
|
||||
n, err := strconv.ParseUint(c.Val(), 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if n < 0 {
|
||||
return fmt.Errorf("max_fails can't be negative: %d", n)
|
||||
}
|
||||
f.maxfails = uint32(n)
|
||||
case "health_check":
|
||||
if !c.NextArg() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue