Code

relax check for -w/-c to accept floats (bug report from Warrick FitzGerald)
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>
Tue, 2 Mar 2004 05:25:33 +0000 (05:25 +0000)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>
Tue, 2 Mar 2004 05:25:33 +0000 (05:25 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@835 f882894a-f735-0410-b71e-b25c423dba1c

plugins/check_http.c

index e6f88e9df10898cfdf4b4c8586b219617f2dcda6..b676eec50331bac8c4a29e29ee13cac2b8183d39 100644 (file)
@@ -255,7 +255,7 @@ process_arguments (int argc, char **argv)
                                socket_timeout = atoi (optarg);
                        break;
                case 'c': /* critical time threshold */
-                       if (!is_intnonneg (optarg))
+                       if (!is_nonnegative (optarg))
                                usage2 (_("invalid critical threshold"), optarg);
                        else {
                                critical_time = strtod (optarg, NULL);
@@ -263,7 +263,7 @@ process_arguments (int argc, char **argv)
                        }
                        break;
                case 'w': /* warning time threshold */
-                       if (!is_intnonneg (optarg))
+                       if (!is_nonnegative (optarg))
                                usage2 (_("invalid warning threshold"), optarg);
                        else {
                                warning_time = strtod (optarg, NULL);