]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Code cleanup.
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 8 Oct 2012 21:04:54 +0000 (23:04 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 8 Oct 2012 21:04:54 +0000 (23:04 +0200)
fde.c (binary_search_fde): Remove always true <address >= start> conditional.
Move L initialization upwards.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
libdw/ChangeLog
libdw/fde.c

index 416a16f1e13b525b2e558573b583e42972959d66..3500cf818af130585357e4aec61256608a918066 100644 (file)
@@ -1,3 +1,9 @@
+2012-10-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Code cleanup.
+       * fde.c (binary_search_fde): Remove always true <address >= start>
+       conditional.  Move L initialization upwards.
+
 2012-08-24  Mark Wielaard  <mjw@redhat.com>
 
        * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
index d3667686f2bad2d428698e2428ca32be2f627ccb..bde0c99239edb53db8e6695147d1e41d3439e7d7 100644 (file)
@@ -181,32 +181,30 @@ binary_search_fde (Dwarf_CFI *cache, Dwarf_Addr address)
        u = idx;
       else
        {
+         l = idx + 1;
+
          Dwarf_Addr fde;
          if (unlikely (read_encoded_value (&dummy_cfi,
                                            cache->search_table_encoding, &p,
                                            &fde)))
            break;
-         if (address >= start)
+
+         /* If this is the last entry, its upper bound is assumed to be
+            the end of the module.
+            XXX really should be end of containing PT_LOAD segment */
+         if (l < cache->search_table_entries)
            {
-             l = idx + 1;
-
-             /* If this is the last entry, its upper bound is assumed to be
-                the end of the module.
-                XXX really should be end of containing PT_LOAD segment */
-             if (l < cache->search_table_entries)
-               {
-                 /* Look at the start address in the following entry.  */
-                 Dwarf_Addr end;
-                 if (unlikely (read_encoded_value
-                               (&dummy_cfi, cache->search_table_encoding, &p,
-                                &end)))
-                   break;
-                 if (address >= end)
-                   continue;
-               }
-
-             return fde - cache->frame_vaddr;
+             /* Look at the start address in the following entry.  */
+             Dwarf_Addr end;
+             if (unlikely (read_encoded_value
+                           (&dummy_cfi, cache->search_table_encoding, &p,
+                            &end)))
+               break;
+             if (address >= end)
+               continue;
            }
+
+         return fde - cache->frame_vaddr;
        }
     }