﻿# V8037\. The same argument was passed to a function multiple times\. A different argument may have been intended\.

The analyzer has detected a potential error caused by passing the same argument multiple times when a method or function is calling\.

The example N1:

```cpp
func Do(mX, mY, mZ int) {
  ....
}

func (vec Vector) Foo() {
  Do(vec.x, vec.y, vec.y)
}
```

In the `Do` function signature and its call, the `vec.y` argument is passed twice\. Most likely, the `mZ` parameter was intended to receive `vec.z`\.

The fixed code:

```cpp
func (vec Vector) Foo() {
  Do(vec.x, vec.y, vec.z)
}
```

Passing identical arguments to certain standard library functions \(`math.Min`, `math.Max`, and `strings.Replace`\) may also be an error\.

The example N2:

```cpp
var count, capacity int
....
size := math.Max(float64(count), float64(count))
```

Due to a typo, `math.Max` compares the `count` variable with itself\. Therefore, the function always returns the value of `count`\.

The fixed code:

```cpp
size := math.Max(float64(count), float64(capacity))
```