From 93e05bff1ac0d66e7e880e4764e68f99f34a723a Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 5 May 2010 15:15:36 +0200 Subject: [PATCH] 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 acd0d5c2b..4d136c2d9 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 0ca54d510..b2e9dc935 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 d95a0a4c6..694a53986 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(¤t_time);