[ofa-general] [PATCH] opensm/osm_subnet.c: break matching when config parameter already found

Sasha Khapyorsky sashak at voltaire.com
Sat Feb 7 01:43:56 PST 2009


Break config parameter matching procedure when it is already found.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/opensm/osm_subnet.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 42c5682..3324af9 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -1165,6 +1165,7 @@ int osm_subn_parse_conf_file(char *file_name, osm_subn_opt_t * const p_opts)
 			p_field = (void *)p_opts + r->opt_offset;
 			/* don't call setup function first time */
 			r->parse_fn(NULL, p_key, p_val, p_field, NULL);
+			break;
 		}
 	}
 	fclose(opts_file);
@@ -1216,6 +1217,7 @@ int osm_subn_rescan_conf_files(IN osm_subn_t * const p_subn)
 
 			p_field = (void *)p_opts + r->opt_offset;
 			r->parse_fn(p_subn, p_key, p_val, p_field, r->setup_fn);
+			break;
 		}
 	}
 	fclose(opts_file);
-- 
1.6.1.2.319.gbd9e




More information about the general mailing list