projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d703cd
)
Allow Size 0 in ping plugin, and fix minor style issues there
author
Witold Baryluk
<witold.baryluk@gmail.com>
Wed, 2 Dec 2015 00:51:36 +0000
(
01:51
+0100)
committer
Witold Baryluk
<witold.baryluk@gmail.com>
Wed, 2 Dec 2015 00:52:12 +0000
(
01:52
+0100)
src/ping.c
patch
|
blob
|
history
diff --git
a/src/ping.c
b/src/ping.c
index
7eb2293
..
cac8a3f
100644
(file)
--- a/
src/ping.c
+++ b/
src/ping.c
@@
-547,15
+547,15
@@
static int ping_config (const char *key, const char *value) /* {{{ */
if (ping_data != NULL)
{
- free(ping_data);
+ free
(ping_data);
ping_data = NULL;
}
size = atoi (value);
- if ((size >=
1
) && (size <= 65536))
+ if ((size >=
0
) && (size <= 65536))
{
int i;
- ping_data = (char*) malloc(size + 1);
+ ping_data = (char
*) malloc(size + 1);
if (ping_data == NULL)
{
char errbuf[1024];