aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_nt.c
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-11-12 05:53:06 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-11-12 05:53:06 +0000
commit95c6a6d05d6638ca0043620df21a0967e17be4d3 (patch)
tree7bef3c9b96ea7180174f78978131d632c507550a /plugins/check_nt.c
parent7626b3413d1d84aa1768ad47626d044cf3f2791a (diff)
downloadmonitoring-plugins-95c6a6d05d6638ca0043620df21a0967e17be4d3.tar.gz
clean up compiler warnings
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@767 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_nt.c')
-rw-r--r--plugins/check_nt.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index 91442a5a..50bf9f03 100644
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv){
asprintf (&output_message, _("Wrong client version - running: %s, required: %s"), recv_buffer, value_list);
return_code = STATE_WARNING;
} else {
- asprintf (&output_message, recv_buffer);
+ asprintf (&output_message, "%s", recv_buffer);
return_code = STATE_OK;
}
break;
@@ -238,12 +238,11 @@ int main(int argc, char **argv){
mem_commitLimit / 1048576, mem_commitByte / 1048567, percent_used_space,
(mem_commitLimit - mem_commitByte) / 1048576, (mem_commitLimit - mem_commitByte) / mem_commitLimit * 100);
+ return_code=STATE_OK;
if(check_critical_value==TRUE && percent_used_space >= critical_value)
return_code=STATE_CRITICAL;
else if (check_warning_value==TRUE && percent_used_space >= warning_value)
return_code=STATE_WARNING;
- else
- return_code=STATE_OK;
break;
@@ -273,13 +272,12 @@ int main(int argc, char **argv){
return_code=STATE_OK;
}
else { /* inverse thresholds */
+ return_code=STATE_OK;
if(check_critical_value==TRUE && counter_value <= critical_value)
return_code=STATE_CRITICAL;
else if (check_warning_value==TRUE && counter_value <= warning_value)
return_code=STATE_WARNING;
- else
- return_code=STATE_OK;
- }
+ }
}
break;