Code

check_snmp: Fix regression introduced in #1867716
[nagiosplug.git] / plugins / check_users.c
index e4ef681f6075227e38d2030692a43debddb1b9f8..1bd2c8b2ce99712299d6805351e08f7dfb28aa01 100644 (file)
@@ -5,8 +5,6 @@
 * License: GPL
 * Copyright (c) 2000-2007 Nagios Plugins Development Team
 * 
-* Last Modified: $Date$
-* 
 * Description:
 * 
 * This file contains the check_users plugin
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
-* $Id$
 * 
 *****************************************************************************/
 
 const char *progname = "check_users";
-const char *revision = "$Revision$";
 const char *copyright = "2000-2007";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
@@ -108,9 +104,9 @@ main (int argc, char **argv)
                result = possibly_set (result, STATE_UNKNOWN);
 
        /* else check the user count against warning and critical thresholds */
-       if (users >= cusers)
+       if (users > cusers)
                result = STATE_CRITICAL;
-       else if (users >= wusers)
+       else if (users > wusers)
                result = STATE_WARNING;
        else if (users >= 0)
                result = STATE_OK;
@@ -163,7 +159,7 @@ process_arguments (int argc, char **argv)
                        print_help ();
                        exit (STATE_OK);
                case 'V':                                                                       /* version */
-                       print_revision (progname, revision);
+                       print_revision (progname, NP_VERSION);
                        exit (STATE_OK);
                case 'c':                                                                       /* critical */
                        if (!is_intnonneg (optarg))
@@ -203,7 +199,7 @@ process_arguments (int argc, char **argv)
 void
 print_help (void)
 {
-       print_revision (progname, revision);
+       print_revision (progname, NP_VERSION);
 
        printf ("Copyright (c) 1999 Ethan Galstad\n");
        printf (COPYRIGHT, copyright, email);