summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-10 08:54:52 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-10 08:54:52 +0000
commitd7154e517a736c6eb680545a45436bdaefe574d0 (patch)
tree77ccb844e37638bb07ef6098b68a38d5713e84d7 /src
parent20e3089ae1fbb7ce62ed3880cd2cc1e093d37ac0 (diff)
downloadzabbix-d7154e517a736c6eb680545a45436bdaefe574d0.tar.gz
zabbix-d7154e517a736c6eb680545a45436bdaefe574d0.tar.xz
zabbix-d7154e517a736c6eb680545a45436bdaefe574d0.zip
Minor code cleanup.
git-svn-id: svn://svn.zabbix.com/trunk@2295 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src')
-rw-r--r--src/libs/zbxsysinfo/common/common.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/libs/zbxsysinfo/common/common.c b/src/libs/zbxsysinfo/common/common.c
index fd54a2ec..75c46e4e 100644
--- a/src/libs/zbxsysinfo/common/common.c
+++ b/src/libs/zbxsysinfo/common/common.c
@@ -611,8 +611,8 @@ int VFS_FILE_CKSUM(const char *cmd, const char *param, unsigned flags, AGENT_RES
cval = ~crc;
- result->type |= AR_DOUBLE;
- result->dbl = (double)cval;
+ result->type |= AR_UINT64;
+ result->ui64 = (zbx_uint64_t)cval;
return SYSINFO_RET_OK;
}
@@ -660,8 +660,8 @@ int get_stat(const char *key, unsigned flags, AGENT_RESULT *result)
if(strcmp(name1,key) == 0)
{
fclose(f);
- result->type |= AR_DOUBLE;
- result->dbl = atof(name2);
+ result->type |= AR_UINT64;
+ result->ui64 = (zbx_uint64_t)atoi(name2);
return SYSINFO_RET_OK;
}
}
@@ -761,15 +761,15 @@ int TCP_LISTEN(const char *cmd, const char *param, unsigned flags, AGENT_RESULT
if(NULL != strstr(c,pattern))
{
fclose(f);
- result->type |= AR_DOUBLE;
- result->dbl = 1;
+ result->type |= AR_UINT64;
+ result->ui64 = 1;
return SYSINFO_RET_OK;
}
}
fclose(f);
- result->type |= AR_DOUBLE;
- result->dbl = 0;
+ result->type |= AR_UINT64;
+ result->ui64 = 0;
return SYSINFO_RET_OK;
#else
@@ -818,8 +818,8 @@ int AGENT_PING(const char *cmd, const char *param, unsigned flags, AGENT_RESULT
clean_result(result);
- result->type |= AR_DOUBLE;
- result->dbl = 1;
+ result->type |= AR_UINT64;
+ result->ui64 = 1;
return SYSINFO_RET_OK;
}
@@ -834,8 +834,8 @@ int PROCCOUNT(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *
if( 0 == sysinfo(&info))
{
- result->type |= AR_DOUBLE;
- result->dbl = (double)info.procs;
+ result->type |= AR_UINT64;
+ result->ui64 = (zbx_uint64_t)info.procs;
return SYSINFO_RET_OK;
}
else
@@ -894,8 +894,8 @@ int PROCCOUNT(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *
}
closedir(dir);
- result->type |= AR_DOUBLE;
- result->dbl = (double)proccount;
+ result->type |= AR_UINT64;
+ result->ui64 = (zbx_uint64_t)proccount;
return SYSINFO_RET_OK;
#else
@@ -943,8 +943,8 @@ int PROCCOUNT(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *
}
closedir(dir);
- result->type |= AR_DOUBLE;
- result->dbl = (double)proccount;
+ result->type |= AR_UINT64;
+ result->ui64 = (zbx_uint64_t)proccount;
return SYSINFO_RET_OK;
#else
@@ -1741,8 +1741,8 @@ int CHECK_PORT(const char *cmd, const char *ip_and_port, unsigned flags, AGENT_R
ret = tcp_expect(ip,port,NULL,NULL,"",&value_int);
- result->type |= AR_DOUBLE;
- result->dbl = (double)value_int;
+ result->type |= AR_UINT64;
+ result->ui64 = (zbx_uint64_t)value_int;
return ret;
}
@@ -1798,8 +1798,8 @@ int CHECK_DNS(const char *cmd, const char *ip_and_zone, unsigned flags, AGENT_RE
res = inet_aton(ip, &in);
if(res != 1)
{
- result->type |= AR_DOUBLE;
- result->dbl = 0;
+ result->type |= AR_UINT64;
+ result->ui64 = 0;
return SYSINFO_RET_FAIL;
}
@@ -1828,8 +1828,8 @@ int CHECK_DNS(const char *cmd, const char *ip_and_zone, unsigned flags, AGENT_RE
#else
res=res_query(zone,ns_c_in,ns_t_soa,(unsigned char *)respbuf,sizeof(respbuf));
#endif
- result->type |= AR_DOUBLE;
- result->dbl = (double)(res != -1 ? 1 : 0);
+ result->type |= AR_UINT64;
+ result->ui64 = (zbx_uint64_t)(res != -1 ? 1 : 0);
return SYSINFO_RET_OK;
}