diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-01-22 06:34:31 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-01-22 06:34:31 +0000 |
commit | 8d358d95cc4b7389dec1962f6062af8e90ab93d9 (patch) | |
tree | c1b22fa9141d246e1f554bfba4a158537051dc73 /libdw/dwarf_getattrs.c | |
parent | a969d8e19470157be1b8b2e1a693ac7702bf4273 (diff) | |
download | elfutils-8d358d95cc4b7389dec1962f6062af8e90ab93d9.tar.gz |
Minor optimizations.
Diffstat (limited to 'libdw/dwarf_getattrs.c')
-rw-r--r-- | libdw/dwarf_getattrs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libdw/dwarf_getattrs.c b/libdw/dwarf_getattrs.c index 932c5cc1..42f25ca0 100644 --- a/libdw/dwarf_getattrs.c +++ b/libdw/dwarf_getattrs.c @@ -72,8 +72,9 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), /* Find the abbreviation. */ die->abbrev = __libdw_findabbrev (die->cu, u128); - if (die->abbrev == DWARF_END_ABBREV) + if (unlikely (die->abbrev == DWARF_END_ABBREV)) { + invalid_dwarf: __libdw_seterrno (DWARF_E_INVALID_DWARF); return -1l; } @@ -89,10 +90,7 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), if (unlikely (attrp >= ((unsigned char *) dbg->sectiondata[IDX_debug_abbrev]->d_buf + dbg->sectiondata[IDX_debug_abbrev]->d_size))) - { - __libdw_seterrno (DWARF_E_INVALID_DWARF); - return -1; - } + goto invalid_dwarf; /* Get attribute name and form. */ Dwarf_Attribute attr; |