From 0f40d8131d1217b8a5844859dc2b2626ee0e7318 Mon Sep 17 00:00:00 2001 From: Jon Nangle Date: Mon, 14 Nov 2016 16:13:47 +0000 Subject: [PATCH] Convert arguments to Fixnums before using them --- check_ntpd.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_ntpd.rb b/check_ntpd.rb index 4f3bcf6..67a8278 100755 --- a/check_ntpd.rb +++ b/check_ntpd.rb @@ -28,19 +28,19 @@ def print_overall_health(status) opts.banner = "Usage: check_ntpd.rb [options]"; opts.on("-c", "--critical [INT]", "Set the Critical Health Threshold.") do |c| - options[:critical_threshold] = c; + options[:critical_threshold] = c.to_i; end opts.on("-w", "--warning [INT]", "Set the Warning Health Threshold.") do |w| - options[:warning_threshold] = w; + options[:warning_threshold] = w.to_i; end opts.on("--peer_critical [INT]", "Set the Critical threshold on the number of active peers.") do |c| - options[:peer_critical_threshold] = c; + options[:peer_critical_threshold] = c.to_i; end opts.on("--peer_warning [INT]", "Set the Warning threshold on the number of active peers.") do |w| - options[:peer_warning_threshold] = w; + options[:peer_warning_threshold] = w.to_i; end end.parse!