summaryrefslogtreecommitdiffstats
path: root/plugins/check_ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r--plugins/check_ping.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 6b56660..a6c43c3 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -50,7 +50,7 @@ int cpl = UNKNOWN_PACKET_LOSS;
50float wrta = UNKNOWN_TRIP_TIME; 50float wrta = UNKNOWN_TRIP_TIME;
51float crta = UNKNOWN_TRIP_TIME; 51float crta = UNKNOWN_TRIP_TIME;
52char **addresses = NULL; 52char **addresses = NULL;
53int n_addresses; 53int n_addresses = 0;
54int max_addr = 1; 54int max_addr = 1;
55int max_packets = -1; 55int max_packets = -1;
56int verbose = 0; 56int verbose = 0;
@@ -392,6 +392,11 @@ validate_arguments ()
392 usage2 (_("Invalid hostname/address"), addresses[i]); 392 usage2 (_("Invalid hostname/address"), addresses[i]);
393 } 393 }
394 394
395 if (n_addresses == 0) {
396 printf(_("You must specify a server address or host name\n"));
397 return ERROR;
398 }
399
395 return OK; 400 return OK;
396} 401}
397 402