diff options
author | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2002-06-19 05:11:52 +0000 |
---|---|---|
committer | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2002-06-19 05:11:52 +0000 |
commit | f4c6f7f09305c1c9916da6ac4f7aadcb31e319e0 (patch) | |
tree | bec7f042f90eac26b30122806846fc6a0e3f13b7 /plugins/check_vsz.c | |
parent | d36016a7adf28424d7f4adaa50612c41f1937c3b (diff) | |
download | monitoring-plugins-f4c6f7f09305c1c9916da6ac4f7aadcb31e319e0.tar.gz |
more POSIX return value comparison related code fixes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@55 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_vsz.c')
-rw-r--r-- | plugins/check_vsz.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_vsz.c b/plugins/check_vsz.c index c8ca82bd..f53eeae3 100644 --- a/plugins/check_vsz.c +++ b/plugins/check_vsz.c | |||
@@ -93,7 +93,7 @@ main (int argc, char **argv) | |||
93 | terminate (STATE_UNKNOWN, | 93 | terminate (STATE_UNKNOWN, |
94 | "check_vsz: could not malloc message (1)"); | 94 | "check_vsz: could not malloc message (1)"); |
95 | sprintf (message, "%s %s(%d)", message, proc_name, proc_size); | 95 | sprintf (message, "%s %s(%d)", message, proc_name, proc_size); |
96 | result = max (result, STATE_WARNING); | 96 | result = max_state (result, STATE_WARNING); |
97 | } | 97 | } |
98 | if (proc_size > crit) { | 98 | if (proc_size > crit) { |
99 | result = STATE_CRITICAL; | 99 | result = STATE_CRITICAL; |
@@ -107,7 +107,7 @@ main (int argc, char **argv) | |||
107 | "check_vsz: could not malloc message (2)"); | 107 | "check_vsz: could not malloc message (2)"); |
108 | sprintf (message, "%s %d", message, proc_size); | 108 | sprintf (message, "%s %d", message, proc_size); |
109 | if (proc_size > warn) { | 109 | if (proc_size > warn) { |
110 | result = max (result, STATE_WARNING); | 110 | result = max_state (result, STATE_WARNING); |
111 | } | 111 | } |
112 | if (proc_size > crit) { | 112 | if (proc_size > crit) { |
113 | result = STATE_CRITICAL; | 113 | result = STATE_CRITICAL; |
@@ -118,13 +118,13 @@ main (int argc, char **argv) | |||
118 | 118 | ||
119 | /* If we get anything on STDERR, at least set warning */ | 119 | /* If we get anything on STDERR, at least set warning */ |
120 | while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) | 120 | while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) |
121 | result = max (result, STATE_WARNING); | 121 | result = max_state (result, STATE_WARNING); |
122 | 122 | ||
123 | (void) fclose (child_stderr); | 123 | (void) fclose (child_stderr); |
124 | 124 | ||
125 | /* close the pipe */ | 125 | /* close the pipe */ |
126 | if (spclose (child_process)) | 126 | if (spclose (child_process)) |
127 | result = max (result, STATE_WARNING); | 127 | result = max_state (result, STATE_WARNING); |
128 | 128 | ||
129 | if (result == STATE_OK) | 129 | if (result == STATE_OK) |
130 | printf ("ok (all VSZ<%d): %s\n", warn, message); | 130 | printf ("ok (all VSZ<%d): %s\n", warn, message); |