Skip to content

Commit

Permalink
minor staticcheck fixes (#263)
Browse files Browse the repository at this point in the history
S1019 - Simplify make call by omitting redundant arguments
S1025 - Don’t use fmt.Sprintf("%s", x) unnecessarily

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
  • Loading branch information
binjip978 authored Jan 16, 2024
1 parent 4284bb8 commit 5529b02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/cpio9p.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (l *CPIO9PFID) Readlink() (string, error) {
if err != nil {
return "", err
}
link := make([]byte, r.FileSize, r.FileSize)
link := make([]byte, r.FileSize)
v("cpio:readlink: %d byte link", len(link))
if n, err := r.ReadAt(link, 0); err != nil || n != len(link) {
v("cpio:readlink: fail with (%d,%v)", n, err)
Expand Down
2 changes: 1 addition & 1 deletion cmds/cpud/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type modifier struct {
}

func (m *modifier) String() string {
return fmt.Sprintf("%s", m.name)
return m.name
}

var (
Expand Down

0 comments on commit 5529b02

Please sign in to comment.