summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b606324)
raw | patch | inline | side by side (parent: b606324)
author | Florian Forster <octo@collectd.org> | |
Sun, 11 Mar 2012 11:57:10 +0000 (12:57 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sun, 11 Mar 2012 11:57:53 +0000 (12:57 +0100) |
Resolves GitHub issue #49.
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index 700b27f09c0613e45b3d01e46c3847eb98da3af6..06cc2c5012554dfae90be5c2c8411574cb3039ba 100644 (file)
--- a/src/network.c
+++ b/src/network.c
exp_size = 3 * sizeof (uint16_t)
+ pkg_numval * (sizeof (uint8_t) + sizeof (value_t));
- if ((buffer_len < 0) || (buffer_len < exp_size))
+ if (buffer_len < exp_size)
{
WARNING ("network plugin: parse_part_values: "
"Packet too short: "
uint16_t pkg_length;
- if ((buffer_len < 0) || ((size_t) buffer_len < exp_size))
+ if (buffer_len < exp_size)
{
WARNING ("network plugin: parse_part_number: "
"Packet too short: "
uint16_t pkg_length;
- if ((buffer_len < 0) || (buffer_len < header_size))
+ if (buffer_len < header_size)
{
WARNING ("network plugin: parse_part_string: "
"Packet too short: "