summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d001e08)
raw | patch | inline | side by side (parent: d001e08)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Tue, 1 Apr 2008 09:38:37 +0000 (09:38 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Tue, 1 Apr 2008 09:38:37 +0000 (09:38 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1972 f882894a-f735-0410-b71e-b25c423dba1c
lib/parse_ini.c | patch | blob | history |
diff --git a/lib/parse_ini.c b/lib/parse_ini.c
index e2e5d2c5e237b36e99eeba73ea7a5e519a08e041..aaba03e060b3551e83f6191b516b07badeec85ee 100644 (file)
--- a/lib/parse_ini.c
+++ b/lib/parse_ini.c
/* if a file was specified or if we're using the default file */
if(i.file != NULL && strlen(i.file) > 0){
if(strcmp(i.file, "-")==0){
- inifile=stdout; /* FIXME: Shouldn't it be 'stdin' ??? */
+ inifile=stdin;
} else {
inifile=fopen(i.file, "r");
}
if(inifile==NULL) die(STATE_UNKNOWN, _("Can't read config file"));
- if(read_defaults(inifile, i.stanza, &defaults)==FALSE && strcmp(i.stanza, default_section) && inifile!=stdout) { /* FIXME: Shouldn't it be 'stdin' ??? */
+ if(read_defaults(inifile, i.stanza, &defaults)==FALSE && strcmp(i.stanza, default_section) && inifile!=stdin) {
/* We got nothing, try the default section */
rewind(inifile);
read_defaults(inifile, default_section, &defaults);
}
free(i.file);
- if(inifile!=stdout) fclose(inifile); /* FIXME: Shouldn't it be 'stdin' ??? */
+ if(inifile!=stdin) fclose(inifile);
}
free(i.stanza);
return defaults;