]> granicus.if.org Git - procps-ng/commit
library: remove one needless function call, <STAT> api
authorJim Warner <james.warner@comcast.net>
Fri, 11 Jan 2019 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Tue, 22 Jan 2019 11:49:24 +0000 (22:49 +1100)
commit68d7f7a673aee38238d054efe2fe207db245e3c5
tree2dd2552a191b9679a8d25d5028bcc5e534bfe874
parent288d759b8bdf22f194bdda88dbee0192bbc75bb0
library: remove one needless function call, <STAT> api

This small change is an outgrowth of the research into
the bug represented by that merge request shown below.

With the master branch, a real buglet was subsequently
addressed. In this newlib branch, no bug existed since
the <stat> API relies solely on just cpus reflected in
(and parsed from) the kernel's /proc/stat pseudo file.

[ since that procps_stat_new() priming read about to ]
[ be performed will value info->cpus.total, there is ]
[ no need to separately invoke a procps_cpu_count(). ]

Reference(s):
https://gitlab.com/procps-ng/procps/merge_requests/82

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/stat.c