From b6da2bd76e7d66a228181f7993265cf859d5351f Mon Sep 17 00:00:00 2001 From: WAKAYAMA shirou Date: Wed, 10 May 2017 11:47:26 +0900 Subject: [PATCH] [freebsd] cpu: fix CPUInfo on 10.3R Related: #307 --- cpu/cpu_freebsd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/cpu_freebsd.go b/cpu/cpu_freebsd.go index 877fe7e..7d0321f 100644 --- a/cpu/cpu_freebsd.go +++ b/cpu/cpu_freebsd.go @@ -146,7 +146,7 @@ func Info() ([]InfoStat, error) { func parseDmesgBoot(fileName string) (InfoStat, int, error) { c := InfoStat{} lines, _ := common.ReadLines(fileName) - var cpuNum int + cpuNum := 1 // default cpu num is 1 for _, line := range lines { if matches := cpuEnd.FindStringSubmatch(line); matches != nil { break