Skip to content

Commit

Permalink
simpler nil checks
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Dec 7, 2018
1 parent 0088c47 commit d9b647b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions route/access_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
// AccessDeniedHTTP checks rules on the target for HTTP proxy routes.
func (t *Target) AccessDeniedHTTP(r *http.Request) bool {
// No rules ... skip checks
if t.accessRules == nil || len(t.accessRules) == 0 {
if len(t.accessRules) == 0 {
return false
}

Expand Down Expand Up @@ -72,7 +72,7 @@ func (t *Target) AccessDeniedTCP(c net.Conn) bool {
// Therefore we explicitly check and bail out early if there are no
// rules defined for the target.
// See https://github.com/fabiolb/fabio/issues/524 for background.
if t.accessRules == nil || len(t.accessRules) == 0 {
if len(t.accessRules) == 0 {
return false
}
// validate remote address assertion
Expand Down

0 comments on commit d9b647b

Please sign in to comment.