Merge a few variable declaration and initializations

This commit is contained in:
Michael Eischer
2020-03-06 23:27:37 +01:00
parent 337725c354
commit 37113282ca
4 changed files with 5 additions and 11 deletions

View File

@@ -125,8 +125,7 @@ func (d *dir) Attr(ctx context.Context, a *fuse.Attr) error {
func (d *dir) calcNumberOfLinks() uint32 {
// a directory d has 2 hardlinks + the number
// of directories contained by d
var count uint32
count = 2
count := uint32(2)
for _, node := range d.items {
if node.Type == "dir" {
count++