diff options
| author | Ulrich Drepper <[email protected]> | 2008-01-22 06:34:31 +0000 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2008-01-22 06:34:31 +0000 |
| commit | 8d358d95cc4b7389dec1962f6062af8e90ab93d9 (patch) | |
| tree | c1b22fa9141d246e1f554bfba4a158537051dc73 /libdw/dwarf_child.c | |
| parent | a969d8e19470157be1b8b2e1a693ac7702bf4273 (diff) | |
Minor optimizations.
Diffstat (limited to 'libdw/dwarf_child.c')
| -rw-r--r-- | libdw/dwarf_child.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libdw/dwarf_child.c b/libdw/dwarf_child.c index 121cd191..0080cf9d 100644 --- a/libdw/dwarf_child.c +++ b/libdw/dwarf_child.c @@ -81,6 +81,7 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name, } if (unlikely (die->abbrev == DWARF_END_ABBREV)) { + invalid_dwarf: __libdw_seterrno (DWARF_E_INVALID_DWARF); return NULL; } @@ -95,10 +96,7 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name, { /* Are we still in bounds? This test needs to be refined. */ if (unlikely (attrp + 1 >= endp)) - { - __libdw_seterrno (DWARF_E_INVALID_DWARF); - return NULL; - } + goto invalid_dwarf; /* Get attribute name and form. @@ -166,7 +164,7 @@ dwarf_child (die, result) if (die->abbrev != DWARF_END_ABBREV && (die->abbrev == NULL || die->abbrev->has_children)) addr = __libdw_find_attr (die, INVALID, NULL, NULL); - if (die->abbrev == (Dwarf_Abbrev *) -1l) + if (unlikely (die->abbrev == (Dwarf_Abbrev *) -1l)) return -1; /* Make sure the DIE really has children. */ |
