Skip to content

vmstat: Fix conversion errors due to precision issues in function unitConvert

Qin Fandong requested to merge shell_way/procps:fix-unitConvert-issue into master

For exmaple unitConvert (98720620) will return 98720624, not 98720620.

Because we do (unsigned long)(float)98720620 in function unitConvert and this is wrong! We should do (unsigned long)(double)98720620 here.

Merge request reports