Fixup invalid return code checks of unw_is_signal_frame()

unw_is_signal_frame() returns <= 0 if not a signal frame. Several places in
code were only checking for a "if (unw_is_signal_frame())", or
"if (!unw_is_signal_frame())".
This commit is contained in:
Chris Redmon 2016-06-17 21:26:45 +00:00 committed by Dave Watson
parent 67d4137ba7
commit cf2bc87561
8 changed files with 8 additions and 8 deletions

View File

@ -115,7 +115,7 @@ unw_step (unw_cursor_t *cursor)
c, c->dwarf.ip, c->dwarf.cfa);
/* Check if this is a signal frame. */
if (unw_is_signal_frame (cursor))
if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
ret = dwarf_step (&c->dwarf);

View File

@ -175,7 +175,7 @@ unw_step (unw_cursor_t *cursor)
Debug (1, "(cursor=%p)\n", c);
/* Check if this is a signal frame. */
if (unw_is_signal_frame (cursor))
if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
#ifdef CONFIG_DEBUG_FRAME

View File

@ -79,7 +79,7 @@ unw_step (unw_cursor_t * cursor)
if (unlikely (ret < 0))
{
if (likely (!unw_is_signal_frame (cursor)))
if (likely (unw_is_signal_frame (cursor) <= 0))
{
/* DWARF unwinding failed. As of 09/26/2006, gcc in 64-bit mode
produces the mandatory level of traceback record in the code, but

View File

@ -74,7 +74,7 @@ unw_step (unw_cursor_t * cursor)
if (unlikely (ret < 0))
{
if (likely (!unw_is_signal_frame (cursor)))
if (likely (unw_is_signal_frame (cursor) <= 0))
{
/* DWARF unwinding failed. As of 09/26/2006, gcc in 64-bit mode
produces the mandatory level of traceback record in the code, but

View File

@ -102,7 +102,7 @@ unw_step (unw_cursor_t *cursor)
Debug (1, "(cursor=%p)\n", c);
if (unw_is_signal_frame (cursor))
if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
ret = dwarf_step (&c->dwarf);

View File

@ -36,7 +36,7 @@ unw_step (unw_cursor_t *cursor)
c, c->dwarf.ip, c->dwarf.cfa);
/* Special handling the singal frame. */
if (unw_is_signal_frame (cursor))
if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
/* Try DWARF-based unwinding... */

View File

@ -55,7 +55,7 @@ unw_step (unw_cursor_t *cursor)
Debug (13, "dwarf_step() failed (ret=%d), trying frame-chain\n", ret);
if (unw_is_signal_frame (cursor))
if (unw_is_signal_frame (cursor) > 0)
{
ret = unw_handle_signal_frame(cursor);
if (ret < 0)

View File

@ -114,7 +114,7 @@ unw_step (unw_cursor_t *cursor)
Debug (13, "dwarf_step() failed (ret=%d), trying frame-chain\n", ret);
if (unw_is_signal_frame (cursor))
if (unw_is_signal_frame (cursor) > 0)
{
ret = unw_handle_signal_frame(cursor);
if (ret < 0)