mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-13 22:51:45 +01:00
Fix: for loop can be modernized using range over int
This commit is contained in:
@@ -1263,7 +1263,7 @@ func (m *NvidiaCollector) Read(interval time.Duration, output chan lp.CCMessage)
|
||||
}
|
||||
cclog.ComponentDebug(m.name, "Reading MIG devices for GPU", i)
|
||||
|
||||
for j := 0; j < maxMig; j++ {
|
||||
for j := range maxMig {
|
||||
mdev, ret := nvml.DeviceGetMigDeviceHandleByIndex(m.gpus[i].device, j)
|
||||
if ret != nvml.SUCCESS {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user