summaryrefslogtreecommitdiff
path: root/libdw/dwarf_child.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-01-18 19:59:08 +0000
committerUlrich Drepper <drepper@redhat.com>2008-01-18 19:59:08 +0000
commit35f08c4d52d0ffd9f8aa50f47b84de5603842b1f (patch)
tree7def9d6d4ef3ffea169252d44325cb039294129d /libdw/dwarf_child.c
parent4173bd8d5dd43413ba0635e2a74bc57a9478fb13 (diff)
downloadelfutils-35f08c4d52d0ffd9f8aa50f47b84de5603842b1f.tar.gz
propagate from branch 'com.redhat.elfutils.nickc.pending' (head 28d6423325f0cc14a133eb6b92a8c3604e437ba6)
to branch 'com.redhat.elfutils' (head 6ef48518ed8497626058574c787852bd939d46ee)
Diffstat (limited to 'libdw/dwarf_child.c')
-rw-r--r--libdw/dwarf_child.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdw/dwarf_child.c b/libdw/dwarf_child.c
index b22b010e..bbc75075 100644
--- a/libdw/dwarf_child.c
+++ b/libdw/dwarf_child.c
@@ -1,4 +1,4 @@
-/* Return vhild of current DIE.
+/* Return child of current DIE.
Copyright (C) 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -77,9 +77,9 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name,
if (abbrevp == NULL)
{
abbrevp = __libdw_findabbrev (die->cu, abbrev_code);
- die->abbrev = abbrevp ?: (Dwarf_Abbrev *) -1l;
+ die->abbrev = abbrevp ?: DWARF_END_ABBREV;
}
- if (unlikely (die->abbrev == (Dwarf_Abbrev *) -1l))
+ if (unlikely (die->abbrev == DWARF_END_ABBREV))
{
__libdw_seterrno (DWARF_E_INVALID_DWARF);
return NULL;
@@ -163,7 +163,7 @@ dwarf_child (die, result)
void *addr = NULL;
/* If we already know there are no children do not search. */
- if (die->abbrev != (Dwarf_Abbrev *) -1
+ 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)