Skip to content

Commit

Permalink
Fix vet errors
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
  • Loading branch information
LK4D4 committed Jun 12, 2014
1 parent 8f74c29 commit 0c2c75b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cgroups/fs/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestGetCgroupParamsInt(t *testing.T) {
if err != nil {
t.Fatal(err)
} else if value != floatValue {
t.Fatalf("Expected %f to equal %f", value, floatValue)
t.Fatalf("Expected %d to equal %f", value, floatValue)
}

// Success with new line.
Expand All @@ -43,7 +43,7 @@ func TestGetCgroupParamsInt(t *testing.T) {
if err != nil {
t.Fatal(err)
} else if value != floatValue {
t.Fatalf("Expected %f to equal %f", value, floatValue)
t.Fatalf("Expected %d to equal %f", value, floatValue)
}

// Not a float.
Expand Down
5 changes: 3 additions & 2 deletions mount/pivotroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ package mount

import (
"fmt"
"github.com/dotcloud/docker/pkg/system"
"io/ioutil"
"os"
"path/filepath"
"syscall"

"github.com/dotcloud/docker/pkg/system"
)

func PivotRoot(rootfs string) error {
pivotDir, err := ioutil.TempDir(rootfs, ".pivot_root")
if err != nil {
return fmt.Errorf("can't create pivot_root dir %s", pivotDir, err)
return fmt.Errorf("can't create pivot_root dir %s, error %v", pivotDir, err)
}
if err := system.Pivotroot(rootfs, pivotDir); err != nil {
return fmt.Errorf("pivot_root %s", err)
Expand Down

0 comments on commit 0c2c75b

Please sign in to comment.