libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 09/19] Check correct variable for offset in tes


From: Tommi Rantala
Subject: [Libunwind-devel] [PATCH 09/19] Check correct variable for offset in tests/Gtest-init.cxx
Date: Wed, 5 Sep 2012 14:50:17 +0300

Checking `off' for positiveness does not make any sense, check `offset'
instead.
---
 tests/Gtest-init.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Gtest-init.cxx b/tests/Gtest-init.cxx
index d238a08..9a3f482 100644
--- a/tests/Gtest-init.cxx
+++ b/tests/Gtest-init.cxx
@@ -62,7 +62,7 @@ do_backtrace (void)
       name[0] = '\0';
       off[0] = '\0';
       if (unw_get_proc_name (&cursor, name, sizeof (name), &offset) == 0
-         && off > 0)
+         && offset > 0)
        snprintf (off, sizeof (off), "+0x%lx", (long) offset);
       if (verbose)
        printf ("  [%lx] <%s%s>\n", (long) ip, name, off);
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]