1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-25 12:33:42 +01:00

Check correct variable for offset in tests/Gtest-init.cxx

Checking `off' for positiveness does not make any sense, check `offset'
instead.
This commit is contained in:
Tommi Rantala 2012-08-28 16:55:23 +03:00
parent 6470a67461
commit ffbe29940e

View file

@ -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);