diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-11-07 16:34:58 +0100 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-11-07 16:34:58 +0100 |
commit | 21783b5e2a284081a9b9c8e451f844565b5f0a66 (patch) | |
tree | 9f9b972fa996805c79c8e68e0acd2e2bf54d44b5 | |
parent | 38928e27cf5f46617e53940cbf886adc653522a3 (diff) | |
download | elfutils-21783b5e2a284081a9b9c8e451f844565b5f0a66.tar.gz |
dwfl_core_file_report: Code cleanup: Reindentation.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
-rw-r--r-- | libdwfl/ChangeLog | 6 | ||||
-rw-r--r-- | libdwfl/core-file.c | 57 |
2 files changed, 35 insertions, 28 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 9581909e..5b445e12 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,9 @@ +2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> + + Code cleanup. + * core-file.c (dwfl_core_file_report): Reindent block of code by + continue keyword. + 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com> * argp-std.c (parse_opt): Use executable parameter of diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c index 37613b83..24a3b248 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); |