Skip to content

Commit 0d9368c

Browse files
committed
Updated variable names and added build comment
1 parent 309e575 commit 0d9368c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

fuzz.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build gofuzz
2+
13
package redis
24

35
import (
@@ -22,13 +24,13 @@ func init() {
2224
}
2325

2426
func Fuzz(data []byte) int {
25-
array_len := len(data)
26-
if array_len < 4 {
27+
arrayLen := len(data)
28+
if arrayLen < 4 {
2729
return -1
2830
}
29-
max_iter := int(uint(data[0]))
30-
for i := 0; i < max_iter && i < array_len; i++ {
31-
n := i % array_len
31+
maxIter := int(uint(data[0]))
32+
for i := 0; i < maxIter && i < arrayLen; i++ {
33+
n := i % arrayLen
3234
if n == 0 {
3335
_ = rdb.Set(ctx, string(data[i:]), string(data[i:]), 0).Err()
3436
} else if n == 1 {

0 commit comments

Comments
 (0)