summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-01 19:27:49 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-01 22:42:08 -0700
commitc307e7048da3c02e1e540eab227def7fec7340cc (patch)
treea134fe5f8822e0d9faa7684b6887bc2c139ecd17 /cmd
parent046162cc1ff55985e3dd45eb191729ead1f9cc8d (diff)
lint: Turn on gocritic
Diffstat (limited to 'cmd')
-rw-r--r--cmd/btrfs-rec/inspect_lstrees.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/btrfs-rec/inspect_lstrees.go b/cmd/btrfs-rec/inspect_lstrees.go
index e92c544..a6d86eb 100644
--- a/cmd/btrfs-rec/inspect_lstrees.go
+++ b/cmd/btrfs-rec/inspect_lstrees.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com>
+// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com>
//
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -79,12 +79,12 @@ func init() {
},
Item: func(_ btrfstree.TreePath, item btrfstree.Item) error {
typ := item.Key.ItemType
- treeItemCnt[typ] = treeItemCnt[typ] + 1
+ treeItemCnt[typ]++
return nil
},
BadItem: func(_ btrfstree.TreePath, item btrfstree.Item) error {
typ := item.Key.ItemType
- treeItemCnt[typ] = treeItemCnt[typ] + 1
+ treeItemCnt[typ]++
return nil
},
},
@@ -113,7 +113,7 @@ func init() {
}
for _, item := range node.Data.BodyLeaf {
typ := item.Key.ItemType
- treeItemCnt[typ] = treeItemCnt[typ] + 1
+ treeItemCnt[typ]++
}
}
}