If string config parameter is NULL and input is null_str don't reassign
it again (and don't print useless "Loading Option" message).

Signed-off-by: Sasha Khapyorsky <[EMAIL PROTECTED]>
---
 opensm/opensm/osm_subnet.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index dc35a04..d787fe8 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -623,7 +623,8 @@ opts_unpack_charp(IN char *p_req_key,
                  IN char *p_key, IN char *p_val_str, IN char **p_val)
 {
        if (!strcmp(p_req_key, p_key) && p_val_str) {
-               if ((*p_val == NULL) || strcmp(p_val_str, *p_val)) {
+               const char *current_str = *p_val ? *p_val : null_str ;
+               if (strcmp(p_val_str, current_str)) {
                        log_config_value(p_key, "%s", p_val_str);
                        /* special case the "(null)" string */
                        if (strcmp(null_str, p_val_str) == 0) {
-- 
1.6.0.3.517.g759a

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to