aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_mysql.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <hweiss@users.sourceforge.net> 2007-03-29 17:58:28 +0000
committerGravatar Holger Weiss <hweiss@users.sourceforge.net> 2007-03-29 17:58:28 +0000
commitb809d23c81021ab39000196af87e1dcac4ac291d (patch)
tree23cfd168e4f361d664b76dec9cde5fbcf9abbab1 /plugins/check_mysql.c
parent2a01e28165b321b6d698b9e1868acce76925b9f5 (diff)
downloadmonitoring-plugins-b809d23c81021ab39000196af87e1dcac4ac291d.tar.gz
Fix argument processing (Felix Frank - 1690697)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1655 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_mysql.c')
-rw-r--r--plugins/check_mysql.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 573ec96a..dc8c491d 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -318,18 +318,18 @@ process_arguments (int argc, char **argv)
while ( argc > c ) {
- if (strlen(db_host) == 0)
+ if (db_host == NULL)
if (is_host (argv[c])) {
db_host = argv[c++];
}
else {
- usage2 (_("Invalid hostname/address"), optarg);
+ usage2 (_("Invalid hostname/address"), argv[c]);
}
- else if (strlen(db_user) == 0)
+ else if (db_user == NULL)
db_user = argv[c++];
- else if (strlen(db_pass) == 0)
+ else if (db_pass == NULL)
db_pass = argv[c++];
- else if (strlen(db) == 0)
+ else if (db == NULL)
db = argv[c++];
else if (is_intnonneg (argv[c]))
db_port = atoi (argv[c++]);