[LTP] [PATCH 2/3] syscalls: sysinfo01: Rewrite
Andrea Cervesato
andrea.cervesato@suse.com
Wed Mar 4 16:29:31 CET 2026
Hi!
> + sys_load1 = sys_buf->loads[0] / 65536.0;
> + sys_load5 = sys_buf->loads[1] / 65536.0;
> + sys_load15 = sys_buf->loads[2] / 65536.0;
I would go for:
sys_load1 = sys_buf->loads[0] / (float)(1 << SI_LOAD_SHIFT);
That "magic value" needs at least to be explained on a comment
otherwise. With this fixed:
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list