[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: minor cleanups to icingastats.c ( Eric Sesterhenn)

git at icinga.org git at icinga.org
Mon May 10 20:17:00 CEST 2010


Module: icinga-core
Branch: mfriedrich/core
Commit: 93e05bff1ac0d66e7e880e4764e68f99f34a723a
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=93e05bff1ac0d66e7e880e4764e68f99f34a723a

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed May  5 15:15:36 2010 +0200

minor cleanups to icingastats.c (Eric Sesterhenn)

fixes #385

---

 Changelog          |    1 +
 THANKS             |    1 +
 base/icingastats.c |    4 +---
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Changelog b/Changelog
index acd0d5c..4d136c2 100644
--- a/Changelog
+++ b/Changelog
@@ -16,6 +16,7 @@ FIXES
 * core: fix spurious dollar signs added to command_lines (Alexander Wirt)
 * core: fix for choosing next valid time on day of DST change when clocks go one hour backwards (Ton Voon)
 * core: fix for nagios now erroring when "Error: Could not find any contactgroup matching..." displayed (Ton Voon)
+* core: minor cleanups to icingastats.c (Eric Sesterhenn)
 
 * idoutils: Host DB inserts use string 'NULL\n' instead of NULL (William Preston)
 * idoutils: ndo2db_get_object_id fails to return existing IDs (William Preston)
diff --git a/THANKS b/THANKS
index 0ca54d5..b2e9dc9 100644
--- a/THANKS
+++ b/THANKS
@@ -241,6 +241,7 @@ in various ways.  If we missed your name, let us know.
 * Brian Seklecki
 * Denis Seleznyov
 * Lonny Selinger
+* Eric Sesterhenn
 * Nate Shafer
 * Moshe Sharon
 * Andy Shellam
diff --git a/base/icingastats.c b/base/icingastats.c
index d95a0a4..694a539 100644
--- a/base/icingastats.c
+++ b/base/icingastats.c
@@ -431,7 +431,7 @@ int main(int argc, char **argv){
 	else
 		display_mrtg_values();
 
-	if(nagiostats_file);
+	if(nagiostats_file)
 		free(nagiostats_file);
 
 	/* Opsera patch - return based on error, because mrtg_mode was always returning OK */
@@ -1381,12 +1381,10 @@ int read_status_file(void){
 int read_nagiostats_file(void){
 	char temp_buffer[MAX_INPUT_BUFFER];
 	FILE *fp=NULL;
-	int data_type=STATUS_NO_DATA;
 	char *var=NULL;
 	char *val=NULL;
 	char *temp_ptr=NULL;
 	time_t current_time;
-	unsigned long time_difference=0L;
 
 	time(&current_time);
 





More information about the icinga-checkins mailing list