[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: fix copy paste error #569

git at icinga.org git at icinga.org
Thu Jul 8 21:01:50 CEST 2010


Module: icinga-core
Branch: mfriedrich/core
Commit: 31a6ec21f17a213b99c6567762d5a16636acc7d6
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=31a6ec21f17a213b99c6567762d5a16636acc7d6

Author: Christoph Maser <cmr at financial.com>
Date:   Sun Jul  4 20:41:11 2010 +0200

fix copy paste error  #569

---

 base/config.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/base/config.c b/base/config.c
index a2ec628..104853d 100644
--- a/base/config.c
+++ b/base/config.c
@@ -446,16 +446,13 @@ int read_main_config_file(char *main_config_file){
 				}
 			closedir(tmpdir);
 
-			my_free(temp_path);
-			if((temp_path=(char *)strdup(value))){
-				strip(temp_path);
+			my_free(check_result_path);
+			if((check_result_path=(char *)strdup(value))){
+				strip(check_result_path);
 				/* make sure we don't have a trailing slash */
-				if(temp_path[strlen(temp_path)-1]=='/')
-					temp_path[strlen(temp_path)-1]='\x0';
+				if(check_result_path[strlen(check_result_path)-1]=='/')
+					check_result_path[strlen(check_result_path)-1]='\x0';
 			        }
-
-			my_free(check_result_path);
-			check_result_path=(char *)strdup(temp_path);
 			}
 
 		else if(!strcmp(variable,"max_check_result_file_age"))





More information about the icinga-checkins mailing list