X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b1f2c74d7aca187772c2f009fda4a3043eb9686f..25c5bd4fe8c9fd7c4898e7dfbbdbf68dc172dcd7:/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp index d3c1b960..5a92cff5 100644 --- a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp +++ b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp @@ -36,6 +36,7 @@ #include #include // snprintf #include +#include #include #include "stg/common.h" @@ -1433,8 +1434,8 @@ if (dn < DIR_NUM) aliveSyn6.md[dn], dn, stgTime); - p *= (1024 * 1024); - if (p == 0) + p *= 1024 * 1024; + if (std::fabs(p) < 1.0e-3) { snprintf((char*)aliveSyn6.freeMb, IA_FREEMB_LEN, "---"); } @@ -1523,8 +1524,8 @@ if (dn < DIR_NUM) aliveSyn8.md[dn], dn, stgTime); - p *= (1024 * 1024); - if (p == 0) + p *= 1024 * 1024; + if (std::fabs(p) < 1.0e-3) { snprintf((char*)aliveSyn8.freeMb, IA_FREEMB_LEN, "---"); }