Skip to content

Commit

Permalink
Update: code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignatella committed Sep 23, 2024
1 parent c03509f commit ddb4e4b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (cc *Conn) FlushRuleset() {
func (cc *Conn) dialNetlink() (*netlink.Conn, error) {
var (
conn *netlink.Conn
err error = nil
err error
)

if cc.TestDial != nil {
Expand All @@ -312,9 +312,7 @@ func (cc *Conn) dialNetlink() (*netlink.Conn, error) {
}

for _, opt := range cc.sockOptions {
err := opt(conn)

if err != nil {
if err := opt(conn); err != nil {
return nil, err
}
}
Expand Down

0 comments on commit ddb4e4b

Please sign in to comment.