From: Witold Baryluk Date: Wed, 2 Dec 2015 00:51:36 +0000 (+0100) Subject: Allow Size 0 in ping plugin, and fix minor style issues there X-Git-Tag: collectd-5.6.0~528^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef7cc595639328626c90f4b4bf984f101b389166;p=collectd.git Allow Size 0 in ping plugin, and fix minor style issues there --- diff --git a/src/ping.c b/src/ping.c index 7eb22932..cac8a3fd 100644 --- 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];