projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f650fc4
)
network plugin: unsigned variables can't be negative
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sun, 24 Jul 2016 11:29:25 +0000
(13:29 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sun, 24 Jul 2016 11:30:55 +0000
(13:30 +0200)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
ac076cc
..
d3c6044
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-410,10
+410,10
@@
static int network_dispatch_values (value_list_t *vl, /* {{{ */
{
int status;
{
int status;
- if ((vl->time
<
= 0)
- || (strlen (vl->host)
<
= 0)
- || (strlen (vl->plugin)
<
= 0)
- || (strlen (vl->type)
<
= 0))
+ if ((vl->time
=
= 0)
+ || (strlen (vl->host)
=
= 0)
+ || (strlen (vl->plugin)
=
= 0)
+ || (strlen (vl->type)
=
= 0))
return (-EINVAL);
if (!check_receive_okay (vl))
return (-EINVAL);
if (!check_receive_okay (vl))
@@
-1246,7
+1246,7
@@
static int parse_part_encr_aes256 (sockent_t *se, /* {{{ */
BUFFER_READ (&username_len, sizeof (username_len));
username_len = ntohs (username_len);
BUFFER_READ (&username_len, sizeof (username_len));
username_len = ntohs (username_len);
- if ((username_len
<
= 0)
+ if ((username_len
=
= 0)
|| (username_len > (part_size - (PART_ENCRYPTION_AES256_SIZE + 1))))
{
NOTICE ("network plugin: parse_part_encr_aes256: "
|| (username_len > (part_size - (PART_ENCRYPTION_AES256_SIZE + 1))))
{
NOTICE ("network plugin: parse_part_encr_aes256: "
@@
-1579,13
+1579,13
@@
static int parse_packet (sockent_t *se, /* {{{ */
"unknown severity %i.",
n.severity);
}
"unknown severity %i.",
n.severity);
}
- else if (n.time
<
= 0)
+ else if (n.time
=
= 0)
{
INFO ("network plugin: "
"Ignoring notification with "
"time == 0.");
}
{
INFO ("network plugin: "
"Ignoring notification with "
"time == 0.");
}
- else if (strlen (n.message)
<
= 0)
+ else if (strlen (n.message)
=
= 0)
{
INFO ("network plugin: "
"Ignoring notification with "
{
INFO ("network plugin: "
"Ignoring notification with "