LGTM alerts audit (#7440)

* LGTM alerts audit

* Update x/simulation/mock_tendermint.go

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* Update x/staking/keeper/delegation.go

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* comment false positive

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
Federico Kunze
2020-10-02 15:13:58 +02:00
committed by GitHub
co-authored by Alessio Treglia
parent 2c93ec7a0c
commit 82c9ae3949
5 changed files with 16 additions and 19 deletions
+2 -2
View File
@@ -174,7 +174,7 @@ Example:
$ %s debug raw-bytes [72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 110 100]
`, version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
stringBytes := args[0]
stringBytes = strings.Trim(stringBytes, "[")
stringBytes = strings.Trim(stringBytes, "]")
@@ -182,7 +182,7 @@ $ %s debug raw-bytes [72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 11
byteArray := []byte{}
for _, s := range spl {
b, err := strconv.Atoi(s)
b, err := strconv.ParseInt(s, 10, 8)
if err != nil {
return err
}