From 35f08c4d52d0ffd9f8aa50f47b84de5603842b1f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 18 Jan 2008 19:59:08 +0000 Subject: propagate from branch 'com.redhat.elfutils.nickc.pending' (head 28d6423325f0cc14a133eb6b92a8c3604e437ba6) to branch 'com.redhat.elfutils' (head 6ef48518ed8497626058574c787852bd939d46ee) --- libdw/dwarf_child.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libdw/dwarf_child.c') 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 , 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) -- cgit v1.2.3