Procházet zdrojové kódy

Typos in comments

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2035 f882894a-f735-0410-b71e-b25c423dba1c
Thomas Guyot-Sionnest před 17 roky
rodič
revize
77362a18ba
3 změnil soubory, kde provedl 6 přidání a 6 odebrání
  1. 4 4
      lib/parse_ini.c
  2. 1 1
      lib/parse_ini.h
  3. 1 1
      lib/tests/test_opts.c

+ 4 - 4
lib/parse_ini.c

@@ -304,7 +304,7 @@ static char* default_file(void){
 	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).
@@ -340,8 +340,8 @@ static char* default_file(void){
 			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;
@@ -354,7 +354,7 @@ static char* default_file(void){
 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);

+ 1 - 1
lib/parse_ini.h

@@ -14,7 +14,7 @@ typedef struct np_arg_el {
 } 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

+ 1 - 1
lib/tests/test_opts.c

@@ -145,7 +145,7 @@ main (int argc, char **argv)
 	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 **));