summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2013-11-05 11:27:19 +0100
committerMark Wielaard <mjw@redhat.com>2013-11-05 11:37:20 +0100
commitd8c75df969fff193d143789cba03038db8da5a2c (patch)
treee87a46eff8262a66ba3ccda9f766a2f9e914b60e /tests
parente905583afa364ae5ef23daec8d7810ce96ba923a (diff)
downloadelfutils-d8c75df969fff193d143789cba03038db8da5a2c.tar.gz
tests: allfcts.c (main): Correct dwarf_getfuncs return value check.
The return value of dwarf_getfuncs is a ptrdiff_t that is zero on success, or non-zero (an offset to continue the search) when the callback returned DWARF_CB_ABORT or on error. When an error occurs dwarf_errno is set. Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/allfcts.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 11974e15..c549fa0b 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-05 Mark Wielaard <mjw@redhat.com>
+
+ * allfcts.c (main): Correct dwarf_getfuncs return value check.
+
2013-10-10 Mark Wielaard <mjw@redhat.com>
Josh Stone <jistone@redhat.com>
diff --git a/tests/allfcts.c b/tests/allfcts.c
index 7803722f..10e0f07b 100644
--- a/tests/allfcts.c
+++ b/tests/allfcts.c
@@ -63,7 +63,7 @@ main (int argc, char *argv[])
{
doff = dwarf_getfuncs (die, cb, NULL, doff);
}
- while (doff > 0);
+ while (doff != 0 && dwarf_errno () == 0);
off = noff;
}