Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #385] Minor cleanups to ./base/icingastats.c #174

Closed
icinga-migration opened this issue Apr 29, 2010 · 2 comments
Closed

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/385

Created by snakebyte on 2010-04-29 14:34:38 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2010-05-05 14:15:06 +00:00)
Target Version: 1.0.2
Last Update: 2010-05-05 14:15:06 +00:00 (in Redmine)


hi,

when compiling icinga with -wall -wextra enabled, i noticed some warnings
for this file, there a two unused variables and a broken
if statement. The memory leak is minor since the program exits
right afterwards and the operating system cleans this up.

Regards, Eric

--- icinga-core/base/icingastats.orig 2010-04-29 16:18:13.000000000 +0200

**+ icinga-core/base/icingastats.c 2010-04-29 16:21:40.000000000 +0200
@ -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);

Attachments

Changesets

2010-05-05 13:15:36 +00:00 by mfriedrich 40f64ef

minor cleanups to icingastats.c (Eric Sesterhenn)

fixes #385

2010-05-05 14:12:07 +00:00 by mfriedrich 93e05bf

minor cleanups to icingastats.c (Eric Sesterhenn)

fixes #385

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-05-05 13:05:43 +00:00

  • Assigned to set to mfriedrich
  • Target Version set to 1.0.2

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-05-05 14:15:06 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset commit:"93e05bff1ac0d66e7e880e4764e68f99f34a723a".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant