Skip to content

Commit

Permalink
address linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
QxBytes committed Sep 6, 2024
1 parent 78cf02a commit 8f8075b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions dhcp/dhcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,6 @@ func (c *DHCP) receiveDHCPResponse(ctx context.Context, reader io.ReadCloser, xi

select {
case err := <-recvErrors:
if err == unix.EAGAIN {
return errors.Wrap(err, "timed out while listening for replies")
}
if err != nil {
return errors.Wrap(err, "error during receiving")
}
Expand Down Expand Up @@ -411,7 +408,7 @@ func (c *DHCP) DiscoverRequest(ctx context.Context, mac net.HardwareAddr, ifname

defer func() {
// Ensure the file descriptor is closed when done
if err := writer.Close(); err != nil {
if err = writer.Close(); err != nil {
c.logger.Error("Error closing dhcp writer socket:", zap.Error(err))
}
}()
Expand All @@ -429,7 +426,7 @@ func (c *DHCP) DiscoverRequest(ctx context.Context, mac net.HardwareAddr, ifname
}
defer func() {
// Ensure the file descriptor is closed when done
if err := reader.Close(); err != nil {
if err = reader.Close(); err != nil {
c.logger.Error("Error closing dhcp reader socket:", zap.Error(err))
}
}()
Expand Down

0 comments on commit 8f8075b

Please sign in to comment.