]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarf_haschildren: Return -1 for error case, not 0.
authorRoland McGrath <roland@redhat.com>
Wed, 31 Dec 2008 08:21:04 +0000 (00:21 -0800)
committerRoland McGrath <roland@redhat.com>
Wed, 31 Dec 2008 08:21:04 +0000 (00:21 -0800)
libdw/ChangeLog
libdw/dwarf_haschildren.c
libdw/libdwP.h

index 235fac0130e467186d5ead3cd175260d9bef593d..6884372570a59c20d18783443ea3b0bd5dff1705 100644 (file)
@@ -1,3 +1,9 @@
+2008-12-31  Roland McGrath  <roland@redhat.com>
+
+       * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
+       Reorder members.
+       * dwarf_haschildren.c: Return -1 for error case, not 0.
+
 2008-08-15  Roland McGrath  <roland@redhat.com>
 
        * libdw.map (ELFUTILS_0.136): New version set, inherits from
index fe4319559561b901b3f78bad6c4ff2fa1a4fb660..d9a47ad2955841d357822ce39d8d427bf706ce6e 100644 (file)
@@ -1,5 +1,5 @@
 /* Return string associated with given attribute.
-   Copyright (C) 2003, 2005 Red Hat, Inc.
+   Copyright (C) 2003, 2005, 2008 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -77,7 +77,7 @@ dwarf_haschildren (die)
   if (unlikely (die->abbrev == DWARF_END_ABBREV))
     {
       __libdw_seterrno (DWARF_E_INVALID_DWARF);
-      return 0;
+      return -1;
     }
 
   return die->abbrev->has_children;
index f805295ff26962f1541bc945a901a4a118b1ce08..867ad89b4a711dd9e0b9f61473d14f1df18da575 100644 (file)
@@ -194,12 +194,12 @@ struct Dwarf
 /* Abbreviation representation.  */
 struct Dwarf_Abbrev
 {
+  Dwarf_Off offset;
+  unsigned char *attrp;
+  unsigned int attrcnt;
   unsigned int code;
   unsigned int tag;
-  int has_children;
-  unsigned int attrcnt;
-  unsigned char *attrp;
-  Dwarf_Off offset;
+  bool has_children;
 };
 
 #include "dwarf_abbrev_hash.h"