Просмотр исходного кода

lib/parse_ini.c: Add newline to die() calls

Our die() function doesn't append a newline character to the message.
Holger Weiss 12 лет назад
Родитель
Сommit
2bf7647be6
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      lib/parse_ini.c

+ 2 - 2
lib/parse_ini.c

@@ -368,11 +368,11 @@ default_file_in_path(void)
 	/* shall we spit out a warning that NAGIOS_CONFIG_PATH is deprecated? */
 	/* shall we spit out a warning that NAGIOS_CONFIG_PATH is deprecated? */
 
 
 	if ((tokens = strdup(config_path)) == NULL)
 	if ((tokens = strdup(config_path)) == NULL)
-		die(STATE_UNKNOWN, _("Insufficient Memory"));
+		die(STATE_UNKNOWN, "%s\n", _("Insufficient Memory"));
 	for (dir = strtok(tokens, ":"); dir != NULL; dir = strtok(NULL, ":")) {
 	for (dir = strtok(tokens, ":"); dir != NULL; dir = strtok(NULL, ":")) {
 		for (file = default_ini_file_names; *file != NULL; file++) {
 		for (file = default_ini_file_names; *file != NULL; file++) {
 			if ((asprintf(&ini_file, "%s/%s", dir, *file)) < 0)
 			if ((asprintf(&ini_file, "%s/%s", dir, *file)) < 0)
-				die(STATE_UNKNOWN, _("Insufficient Memory"));
+				die(STATE_UNKNOWN, "%s\n", _("Insufficient Memory"));
 			if (access(ini_file, F_OK) == 0) {
 			if (access(ini_file, F_OK) == 0) {
 				free(tokens);
 				free(tokens);
 				return ini_file;
 				return ini_file;