[Nagiosplug-checkins] SF.net SVN: nagiosplug: [1972] nagiosplug/trunk/lib/parse_ini.c

dermoth at users.sourceforge.net dermoth at users.sourceforge.net
Tue Apr 1 11:38:37 CEST 2008


Revision: 1972
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1972&view=rev
Author:   dermoth
Date:     2008-04-01 02:38:37 -0700 (Tue, 01 Apr 2008)

Log Message:
-----------
fix the obvious...

Modified Paths:
--------------
    nagiosplug/trunk/lib/parse_ini.c

Modified: nagiosplug/trunk/lib/parse_ini.c
===================================================================
--- nagiosplug/trunk/lib/parse_ini.c	2008-04-01 09:31:27 UTC (rev 1971)
+++ nagiosplug/trunk/lib/parse_ini.c	2008-04-01 09:38:37 UTC (rev 1972)
@@ -99,19 +99,19 @@
 	/* 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;	


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list