summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfca151)
raw | patch | inline | side by side (parent: dfca151)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Thu, 21 Aug 2008 04:17:25 +0000 (04:17 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Thu, 21 Aug 2008 04:17:25 +0000 (04:17 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2035 f882894a-f735-0410-b71e-b25c423dba1c
lib/parse_ini.c | patch | blob | history | |
lib/parse_ini.h | patch | blob | history | |
lib/tests/test_opts.c | patch | blob | history |
diff --git a/lib/parse_ini.c b/lib/parse_ini.c
index 96551cfe881a459daf196ce34ce45c9fe8655577..654452d8cd286dd6fbe0dfec4f5a3fd0052148a8 100644 (file)
--- a/lib/parse_ini.c
+++ b/lib/parse_ini.c
size_t len;
if((np_env=getenv("NAGIOS_CONFIG_PATH"))!=NULL) {
- /* skip ant starting colon... */
+ /* skip any starting colon... */
while(*np_env==':') np_env++;
/* Look for NP_DEFAULT_INI_FILENAME1 and NP_DEFAULT_INI_FILENAME2 in
* every PATHs defined (colon-separated).
default_file=strdup(temp_file);
}
- /* Return default_file or empty string (should return NULL if we want to
- * die there...
+ /* Return default_file or empty string (should return NULL if we want plugins
+ * to die there)...
*/
if(default_file)
return default_file;
static int test_file(const char* env, int len, const char* file, char* temp_file){
struct stat sb;
- /* test for len + filelen + '/' + '\0' */
+ /* test if len + filelen + '/' + '\0' fits in temp_file */
if((len+strlen(file)+2)>MAX_INPUT_BUFFER) return -1;
strncpy(temp_file,env,len);
diff --git a/lib/parse_ini.h b/lib/parse_ini.h
index 6357a0eec89524dab951fc5533f3367361d3066e..e0ba8164b02ed8e71770c4ae129c37a21fa90cf7 100644 (file)
--- a/lib/parse_ini.h
+++ b/lib/parse_ini.h
} np_arg_list;
/* FIXME: This is in plugins/common.c. Should be eventually moved to lib/
- * (although for this particular one a configure settings should be ideal)
+ * (although for this particular one a configure settings should be ideal)
*/
#ifndef MAX_INPUT_BUFFER
# define MAX_INPUT_BUFFER 8192
diff --git a/lib/tests/test_opts.c b/lib/tests/test_opts.c
index e878abd8dadb650979094a69fd8dea3ac3e6cd09..e6623d1b9c716efc3b2abfa37569e104efc7c199 100644 (file)
--- a/lib/tests/test_opts.c
+++ b/lib/tests/test_opts.c
ok(array_diff(argc_test, argv_test, 7, argv_known), "twice extra opts using two sections");
my_free(&argc_test,argv_test);
- /* Next three checks dre expected to die. They are commented out as they
+ /* Next three checks are expected to die. They are commented out as they
* could possibly go in a sepatare test checked for return value.
*/
/* argv_test=(char **)malloc(6*sizeof(char **));