diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index a2fd90e01b2f4c250950766d51a2d1179c8626b6..98c504faff1d7f1147514d2afde2a7ffc1f4944f 100644 (file)
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
while (1) {
#ifdef HAVE_GETOPT_H
- c = getopt_long (argc, argv, "+?hVt:c:w:H:P:d:l:p:a:",
+ c = getopt_long (argc, argv, "hVt:c:w:H:P:d:l:p:a:",
long_options, &option_index);
#else
- c = getopt (argc, argv, "+?hVt:c:w:H:P:d:l:p:a:");
+ c = getopt (argc, argv, "hVt:c:w:H:P:d:l:p:a:");
#endif
if (c == EOF)
break;
switch (c) {
case '?': /* usage */
- usage2 ("Unknown argument", optarg);
+ usage3 ("Unknown argument", optopt);
case 'h': /* help */
print_help ();
exit (STATE_OK);