Skip to content

Commit

Permalink
Fix build errors on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxserxxx committed Jun 22, 2020
1 parent 81424fb commit ccf7a68
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions widgets/proc_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,18 @@ func getProcs() ([]Proc, error) {
}
pid, err := strconv.Atoi(strings.TrimSpace(process.Pid))
if err != nil {
log.Printf(tr.Value("widget.proc.err.pidconv", err.Error(), process))
sp := fmt.Sprintf("%v", process)
log.Printf(tr.Value("widget.proc.err.pidconv", err.Error(), sp))
}
cpu, err := strconv.ParseFloat(utils.ConvertLocalizedString(process.CPU), 32)
if err != nil {
log.Printf(tr.Value("widget.proc.err.cpuconv", err.Error(), process))
sp := fmt.Sprintf("%v", process)
log.Printf(tr.Value("widget.proc.err.cpuconv", err.Error(), sp))
}
mem, err := strconv.ParseFloat(utils.ConvertLocalizedString(process.Mem), 32)
if err != nil {
log.Printf(tr.Value("widget.proc.err.memconv", err.Error(), process))
sp := fmt.Sprintf("%v", process)
log.Printf(tr.Value("widget.proc.err.memconv", err.Error(), sp))
}
proc := Proc{
Pid: pid,
Expand Down

0 comments on commit ccf7a68

Please sign in to comment.