Code

Don't try to print `optarg' (which will be a NULL pointer) if an unknown
authorHolger Weiss <hweiss@users.sourceforge.net>
Sun, 28 Jan 2007 21:46:41 +0000 (21:46 +0000)
committerHolger Weiss <hweiss@users.sourceforge.net>
Sun, 28 Jan 2007 21:46:41 +0000 (21:46 +0000)
commitfd329a1e91cccc8845923af572890ac42b76afc1
tree1c58ed9155320c49910689c4a762184fa6d2c8db
parent381715a2bd1f9163b791dc2a12ef8c60bac2c19a
Don't try to print `optarg' (which will be a NULL pointer) if an unknown
command line option was used, as this leads to a segfault on some
systems.  The unknown option will be printed by getopt(3) anyway.  So,
simply call print_usage() and exit UNKNOWN via the new usage5() instead.

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
38 files changed:
plugins-root/check_dhcp.c
plugins/check_apt.c
plugins/check_by_ssh.c
plugins/check_dig.c
plugins/check_dns.c
plugins/check_fping.c
plugins/check_game.c
plugins/check_hpjd.c
plugins/check_http.c
plugins/check_ide_smart.c
plugins/check_ldap.c
plugins/check_load.c
plugins/check_mrtg.c
plugins/check_mrtgtraf.c
plugins/check_mysql.c
plugins/check_mysql_query.c
plugins/check_nagios.c
plugins/check_nt.c
plugins/check_ntp.c
plugins/check_nwstat.c
plugins/check_overcr.c
plugins/check_pgsql.c
plugins/check_ping.c
plugins/check_procs.c
plugins/check_radius.c
plugins/check_real.c
plugins/check_smtp.c
plugins/check_snmp.c
plugins/check_ssh.c
plugins/check_swap.c
plugins/check_tcp.c
plugins/check_time.c
plugins/check_ups.c
plugins/check_users.c
plugins/negate.c
plugins/urlize.c
plugins/utils.c
plugins/utils.h