From: Benoit Mortier Date: Fri, 3 Dec 2004 23:55:29 +0000 (+0000) Subject: reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorry X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=30a4266a3a624abbbaace89141f1369ecb5367aa;p=nagiosplug.git reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorry git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@998 f882894a-f735-0410-b71e-b25c423dba1c --- diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index cc2ec75..6d0f4c2 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c @@ -68,7 +68,7 @@ main (int argc, char **argv) textdomain (PACKAGE); /* process arguments */ - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* Set signal handling and alarm timeout */ diff --git a/plugins/check_dig.c b/plugins/check_dig.c index 8f88316..3907186 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c @@ -68,7 +68,7 @@ main (int argc, char **argv) if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) usage4 (_("Cannot catch SIGALRM")); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* get the command to run */ diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 71a6807..669a1cd 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -163,7 +163,7 @@ main (int argc, char **argv) mount_list = read_filesystem_list (0); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); for (me = mount_list; me; me = me->me_next) { diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 2a8f459..55165fc 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -71,7 +71,7 @@ main (int argc, char **argv) usage4 (_("Cannot catch SIGALRM")); } - if (process_arguments (argc, argv) != TRUE) { + if (process_arguments (argc, argv) == ERROR) { usage4 (_("Could not parse arguments")); } diff --git a/plugins/check_fping.c b/plugins/check_fping.c index ce62a7c..7f05d4d 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c @@ -69,7 +69,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); server = strscpy (server, server_name); diff --git a/plugins/check_game.c b/plugins/check_game.c index c0f9a47..9a6e53e 100644 --- a/plugins/check_game.c +++ b/plugins/check_game.c @@ -65,7 +65,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); result = STATE_OK; diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index 678d5c8..d49661a 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c @@ -85,7 +85,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* removed ' 2>1' at end of command 10/27/1999 - EG */ diff --git a/plugins/check_http.c b/plugins/check_http.c index 3ff834b..c0b18fc 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -145,7 +145,7 @@ main (int argc, char **argv) asprintf (&user_agent, "User-Agent: check_http/%s (nagios-plugins %s)", clean_revstring (revision), VERSION); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); if (strstr (timestamp, ":")) { diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index dfdd837..e77ad30 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c @@ -74,7 +74,7 @@ main (int argc, char *argv[]) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_load.c b/plugins/check_load.c index d9833b6..1b7865c 100644 --- a/plugins/check_load.c +++ b/plugins/check_load.c @@ -74,7 +74,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); #if HAVE_GETLOADAVG==1 diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index cf3cc85..f895321 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c @@ -59,7 +59,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments\n")); /* open the MRTG log file for reading */ diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index 0f7afbc..096b3bd 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c @@ -62,7 +62,7 @@ main (int argc, char **argv) char incoming_speed_rating[8]; char outgoing_speed_rating[8]; - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* open the MRTG log file for reading */ diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 1061fab..1e7a82f 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -59,7 +59,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize mysql */ diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c index 29abc2a..b567fe1 100644 --- a/plugins/check_nagios.c +++ b/plugins/check_nagios.c @@ -66,7 +66,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* Set signal handling and alarm timeout */ diff --git a/plugins/check_nt.c b/plugins/check_nt.c index 4826d68..03a7c5d 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c @@ -116,7 +116,7 @@ int main(int argc, char **argv){ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if(process_arguments(argc,argv) != TRUE) + if(process_arguments(argc,argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c index 4dffba3..53e3f1d 100644 --- a/plugins/check_nwstat.c +++ b/plugins/check_nwstat.c @@ -121,7 +121,7 @@ main(int argc, char **argv) { bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments(argc,argv) != TRUE) + if (process_arguments(argc,argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_overcr.c b/plugins/check_overcr.c index 8fb1ef4..756402b 100644 --- a/plugins/check_overcr.c +++ b/plugins/check_overcr.c @@ -85,7 +85,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index a002571..e66eeaf 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -136,7 +136,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* Set signal handling and alarm */ diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 9fe7183..4778fcf 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c @@ -78,7 +78,7 @@ main (int argc, char **argv) addresses = malloc (sizeof(char*) * max_addr); addresses[0] = NULL; - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* Set signal handling and alarm */ diff --git a/plugins/check_procs.c b/plugins/check_procs.c index 5742b72..f2fc2e5 100644 --- a/plugins/check_procs.c +++ b/plugins/check_procs.c @@ -120,7 +120,7 @@ main (int argc, char **argv) asprintf (&metric_name, "PROCS"); metric = METRIC_PROCS; - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* Set signal handling and alarm timeout */ diff --git a/plugins/check_radius.c b/plugins/check_radius.c index bdb9b7a..9e10468 100644 --- a/plugins/check_radius.c +++ b/plugins/check_radius.c @@ -113,7 +113,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); str = strdup ("dictionary"); diff --git a/plugins/check_real.c b/plugins/check_real.c index f843172..492848c 100644 --- a/plugins/check_real.c +++ b/plugins/check_real.c @@ -64,7 +64,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index d834642..f12b69e 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -88,7 +88,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize the HELO command with the localhostname */ diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 18b7f2f..6fae3d1 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -156,7 +156,7 @@ main (int argc, char **argv) output_delim = strdup (DEFAULT_OUTPUT_DELIMITER); miblist = strdup (DEFAULT_MIBLIST); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* create the command line to execute */ diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 04916a5..e957c05 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c @@ -57,7 +57,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_swap.c b/plugins/check_swap.c index 2e5f5c7..4e17163 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c @@ -89,7 +89,7 @@ main (int argc, char **argv) tmp_status = strdup (""); perf = strdup (""); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); #ifdef HAVE_PROC_MEMINFO diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 8dacf59..418438a 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -239,7 +239,7 @@ main (int argc, char **argv) server_quit = QUIT; status = strdup (""); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* use default expect if none listed in process_arguments() */ diff --git a/plugins/check_time.c b/plugins/check_time.c index b2e5374..dae2dd5 100644 --- a/plugins/check_time.c +++ b/plugins/check_time.c @@ -62,7 +62,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_udp.c b/plugins/check_udp.c index e446b93..aa8be1c 100644 --- a/plugins/check_udp.c +++ b/plugins/check_udp.c @@ -51,7 +51,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_ups.c b/plugins/check_ups.c index 8383b09..a4d7650 100644 --- a/plugins/check_ups.c +++ b/plugins/check_ups.c @@ -110,7 +110,7 @@ main (int argc, char **argv) data = strdup (""); message = strdup (""); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ diff --git a/plugins/check_users.c b/plugins/check_users.c index 2c24623..d1b4f01 100644 --- a/plugins/check_users.c +++ b/plugins/check_users.c @@ -50,7 +50,7 @@ main (int argc, char **argv) perf = strdup(""); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* run the command */ diff --git a/plugins/negate.c b/plugins/negate.c index 74a9a9d..e35ddb9 100644 --- a/plugins/negate.c +++ b/plugins/negate.c @@ -83,7 +83,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* Set signal handling and alarm */