From 7f6472617bf086712d995418e2e4df98e2ee4682 Mon Sep 17 00:00:00 2001 From: Nicholas Orlowsky Date: Fri, 31 Mar 2023 00:53:34 -0500 Subject: [PATCH] declarations to assignments --- pkg/util/runtime/cpu_linux.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/util/runtime/cpu_linux.go b/pkg/util/runtime/cpu_linux.go index 7f46a6dd1..d6ea87ad6 100644 --- a/pkg/util/runtime/cpu_linux.go +++ b/pkg/util/runtime/cpu_linux.go @@ -48,10 +48,10 @@ func NumCPU() int { cpuPeriod := -1 if cgroupVersion == 1 { - cpuQuota := readCgroupFileToInt64(cgroupPath, "cpu.cfs_quota_us") - cpuPeriod := readCgroupFileToInt64(cgroupPath, "cpu.cfs_period_us") + cpuQuota = readCgroupFileToInt64(cgroupPath, "cpu.cfs_quota_us") + cpuPeriod = readCgroupFileToInt64(cgroupPath, "cpu.cfs_period_us") } else if cgroupVersion == 2 { - cpuQuota, cpuPeriod := readCgroup2FileToInt64Tuple(cgroupPath, "cpu.max") + cpuQuota, cpuPeriod = readCgroup2FileToInt64Tuple(cgroupPath, "cpu.max") } if cpuQuota == -1 || cpuPeriod == -1 {