X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4b90ce2abff77ca7898fd9292a122440df739916..a27340a44ca0010cef5e5134627dd7774cc911c3:/src/xbt/log.cpp diff --git a/src/xbt/log.cpp b/src/xbt/log.cpp index 7f4da38243..5b16eff25b 100644 --- a/src/xbt/log.cpp +++ b/src/xbt/log.cpp @@ -437,18 +437,15 @@ static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string) static xbt_log_category_t _xbt_log_cat_searchsub(xbt_log_category_t cat, const char* name) { - xbt_log_category_t child; - xbt_log_category_t res; - XBT_DEBUG("Search '%s' into '%s' (firstChild='%s'; nextSibling='%s')", name, cat->name, (cat->firstChild ? cat->firstChild->name : "none"), (cat->nextSibling ? cat->nextSibling->name : "none")); if (strcmp(cat->name, name) == 0) return cat; - for (child = cat->firstChild; child != nullptr; child = child->nextSibling) { + for (xbt_log_category_t child = cat->firstChild; child != nullptr; child = child->nextSibling) { XBT_DEBUG("Dig into %s", child->name); - res = _xbt_log_cat_searchsub(child, name); + xbt_log_category_t res = _xbt_log_cat_searchsub(child, name); if (res) return res; }