summaryrefslogtreecommitdiffstats
path: root/src/libs/zbxjson
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-05-14 07:55:56 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-05-14 07:55:56 +0000
commit2a12f2bb704fd9b5777e0c06499874f2cfddbcb7 (patch)
tree680907c746f1527df97951adb1c67ea68f55e330 /src/libs/zbxjson
parent6b4eabad631afa94d90ae9082438c1077b9c919e (diff)
downloadzabbix-2a12f2bb704fd9b5777e0c06499874f2cfddbcb7.tar.gz
zabbix-2a12f2bb704fd9b5777e0c06499874f2cfddbcb7.tar.xz
zabbix-2a12f2bb704fd9b5777e0c06499874f2cfddbcb7.zip
- [DEV-163] added support of perf_counter[path<,period>]
git-svn-id: svn://svn.zabbix.com/trunk@5700 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxjson')
-rw-r--r--src/libs/zbxjson/json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/zbxjson/json.c b/src/libs/zbxjson/json.c
index 3ef440ca..505d12d5 100644
--- a/src/libs/zbxjson/json.c
+++ b/src/libs/zbxjson/json.c
@@ -549,7 +549,7 @@ static const char *zbx_json_decodestring(const char *p, char *string, size_t len
return ++p;
}
state = 1;
- } else if (state == 1 && o - string < len - 1/*'\0'*/) {
+ } else if (state == 1 && (size_t)(o - string) < len - 1/*'\0'*/) {
if (*p == '\\') {
switch (*++p) {
case '"':
@@ -585,7 +585,7 @@ static const char *zbx_json_decodeint(const char *p, char *string, size_t len)
if ((*p < '0' || *p > '9') && *p != '-') {
*o = '\0';
return p;
- } else if (o - string < len - 1/*'\0'*/)
+ } else if ((size_t)(o - string) < len - 1/*'\0'*/)
*o++ = *p;
p++;
}