From 9426b9a33828c19188d6928ac862dd3179e44e68 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 8 Oct 2023 22:48:39 +0200 Subject: Initialise threshold variables properly --- plugins-root/check_icmp.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'plugins-root') diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index e96fa3ec..abc55952 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -234,7 +234,22 @@ extern char **environ; /** global variables **/ static struct rta_host **table, *cursor, *list; -static threshold crit = {80, 500000}, warn = {40, 200000}; + +static threshold crit = { + .pl = 80, + .rta = 500000, + .jitter = 0.0, + .mos = 0.0, + .score = 0.0 +}; +static threshold warn = { + .pl = 40, + .rta = 200000, + .jitter = 0.0, + .mos = 0.0, + .score = 0.0 +}; + static int mode, protocols, sockets, debug = 0, timeout = 10; static unsigned short icmp_data_size = DEFAULT_PING_DATA_SIZE; static unsigned short icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN; -- cgit v1.2.3-74-g34f1