From d5e4fd059f1e6a40acfb49a5767331af419b7987 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Thu, 23 Apr 2015 07:43:37 -0700 Subject: [PATCH] Ensure the binding and locale strings are always defined --- orte/runtime/data_type_support/orte_dt_print_fns.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/orte/runtime/data_type_support/orte_dt_print_fns.c b/orte/runtime/data_type_support/orte_dt_print_fns.c index 085d89bb4d..30b291c2e3 100644 --- a/orte/runtime/data_type_support/orte_dt_print_fns.c +++ b/orte/runtime/data_type_support/orte_dt_print_fns.c @@ -534,6 +534,8 @@ int orte_dt_print_proc(char **output, char *prefix, orte_proc_t *src, opal_data_ } else { strcpy(locale, "UNKNOWN"); } + } else { + strcpy(locale, "UNKNOWN"); } if (orte_get_attribute(&src->attributes, ORTE_PROC_HWLOC_BOUND, (void**)&bd, OPAL_PTR)) { if (NULL != bd) { @@ -541,8 +543,10 @@ int orte_dt_print_proc(char **output, char *prefix, orte_proc_t *src, opal_data_ strcpy(bind, "UNBOUND"); } } else { - strcpy(bind, "UNKNOWN"); + strcpy(bind, "UNBOUND"); } + } else { + strcpy(bind, "UNBOUND"); } asprintf(&tmp2, "%s\n%s\tState: %s\tApp_context: %ld\n%s\tLocale: %s\n%s\tBinding: %s", tmp, pfx2, orte_proc_state_to_str(src->state), (long)src->app_idx, pfx2, locale, pfx2, bind);