git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed parameters style in sgconv.conf.
[stg.git]
/
projects
/
stargazer
/
plugins
/
authorization
/
inetaccess
/
inetaccess.cpp
diff --git
a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
index d3c1b9605c7e4a419d015582e92e275998fb3779..5a92cff5f6701de2ed6e7fa4249d9031cabd1a05 100644
(file)
--- a/
projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
+++ b/
projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
@@
-36,6
+36,7
@@
#include <cstdlib>
#include <cstdio> // snprintf
#include <cerrno>
#include <cstdlib>
#include <cstdio> // snprintf
#include <cerrno>
+#include <cmath>
#include <algorithm>
#include "stg/common.h"
#include <algorithm>
#include "stg/common.h"
@@
-1433,8
+1434,8
@@
if (dn < DIR_NUM)
aliveSyn6.md[dn],
dn,
stgTime);
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, "---");
}
{
snprintf((char*)aliveSyn6.freeMb, IA_FREEMB_LEN, "---");
}
@@
-1523,8
+1524,8
@@
if (dn < DIR_NUM)
aliveSyn8.md[dn],
dn,
stgTime);
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, "---");
}
{
snprintf((char*)aliveSyn8.freeMb, IA_FREEMB_LEN, "---");
}