Skip to content

Commit

Permalink
Merge pull request kata-containers#168 from jodh-intel/lint-fixes
Browse files Browse the repository at this point in the history
Fix lint errors
  • Loading branch information
grahamwhaley authored Mar 15, 2018
2 parents 01f0f78 + 4683745 commit a930715
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ func (c *agentConfig) getConfig(cmdLineFile string) error {
}

words := strings.Fields(string(kernelCmdline))
for _, w := range words {
word := string(w)
for _, word := range words {
if err := c.parseCmdlineOption(word); err != nil {
agentLog.WithFields(logrus.Fields{
"error": err,
Expand Down
2 changes: 1 addition & 1 deletion device.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func updateSpecDeviceList(device pb.Device, spec *pb.Spec) error {
return err
}

dev := uint64(stat.Rdev)
dev := stat.Rdev

major := int64(unix.Major(dev))
minor := int64(unix.Minor(dev))
Expand Down
6 changes: 5 additions & 1 deletion network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ func TestUpdateRemoveInterface(t *testing.T) {
// Try with a different valid MTU. Make sure we can assign a new set of IP addresses
ifc.Mtu = 500
ifc.IPAddresses[0].Address = "192.168.0.102"
ip2 := pb.IPAddress{0, "182.168.0.103", "24"}
ip2 := pb.IPAddress{
Family: 0,
Address: "182.168.0.103",
Mask: "24",
}
ifc.IPAddresses = append(ifc.IPAddresses, &ip2)

resultingIfc, err = s.updateInterface(netHandle, &ifc)
Expand Down
6 changes: 0 additions & 6 deletions reaper.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,6 @@ func (p *reaperOSProcess) wait() {
(*os.Process)(p).Wait()
}

type reaperExecCmd exec.Cmd

func (c *reaperExecCmd) wait() {
(*exec.Cmd)(c).Wait()
}

type reaperLibcontainerProcess libcontainer.Process

func (p *reaperLibcontainerProcess) wait() {
Expand Down

0 comments on commit a930715

Please sign in to comment.