From: Jan Kratochvil Date: Thu, 7 Nov 2013 15:34:58 +0000 (+0100) Subject: dwfl_core_file_report: Code cleanup: Reindentation. X-Git-Tag: elfutils-0.158~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21783b5e2a284081a9b9c8e451f844565b5f0a66;p=thirdparty%2Felfutils.git dwfl_core_file_report: Code cleanup: Reindentation. Signed-off-by: Jan Kratochvil --- diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 9581909e7..5b445e120 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,9 @@ +2013-11-07 Jan Kratochvil + + Code cleanup. + * core-file.c (dwfl_core_file_report): Reindent block of code by + continue keyword. + 2013-10-30 Jan Kratochvil * argp-std.c (parse_opt): Use executable parameter of diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c index 37613b838..24a3b2482 100644 --- a/libdwfl/core-file.c +++ b/libdwfl/core-file.c @@ -500,34 +500,35 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) lastmodp = &(*lastmodp)->next; for (struct r_debug_info_module *module = r_debug_info.module; module != NULL; module = module->next) - if (module->elf != NULL) - { - Dwfl_Module *mod; - mod = __libdwfl_report_elf (dwfl, basename (module->name), module->name, - module->fd, module->elf, module->l_addr, - true, true); - if (mod == NULL) - continue; - module->elf = NULL; - module->fd = -1; - /* Move this module to the end of the list, so that we end - up with a list in the same order as the link_map chain. */ - if (mod->next != NULL) - { - if (*lastmodp != mod) - { - lastmodp = &dwfl->modulelist; - while (*lastmodp != mod) - lastmodp = &(*lastmodp)->next; - } - *lastmodp = mod->next; - mod->next = NULL; - while (*lastmodp != NULL) - lastmodp = &(*lastmodp)->next; - *lastmodp = mod; - } - lastmodp = &mod->next; - } + { + if (module->elf == NULL) + continue; + Dwfl_Module *mod; + mod = __libdwfl_report_elf (dwfl, basename (module->name), module->name, + module->fd, module->elf, module->l_addr, + true, true); + if (mod == NULL) + continue; + module->elf = NULL; + module->fd = -1; + /* Move this module to the end of the list, so that we end + up with a list in the same order as the link_map chain. */ + if (mod->next != NULL) + { + if (*lastmodp != mod) + { + lastmodp = &dwfl->modulelist; + while (*lastmodp != mod) + lastmodp = &(*lastmodp)->next; + } + *lastmodp = mod->next; + mod->next = NULL; + while (*lastmodp != NULL) + lastmodp = &(*lastmodp)->next; + *lastmodp = mod; + } + lastmodp = &mod->next; + } clear_r_debug_info (&r_debug_info);