Ver Fonte

relax check for -w/-c to accept floats (bug report from Warrick FitzGerald)

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@835 f882894a-f735-0410-b71e-b25c423dba1c
Karl DeBisschop há 22 anos atrás
pai
commit
82ff622fd0
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      plugins/check_http.c

+ 2 - 2
plugins/check_http.c

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