From ef7cc595639328626c90f4b4bf984f101b389166 Mon Sep 17 00:00:00 2001 From: Witold Baryluk Date: Wed, 2 Dec 2015 01:51:36 +0100 Subject: [PATCH] Allow Size 0 in ping plugin, and fix minor style issues there --- src/ping.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]; -- 2.30.2