1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-28 18:07:37 +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'; name[0] = '\0';
off[0] = '\0'; off[0] = '\0';
if (unw_get_proc_name (&cursor, name, sizeof (name), &offset) == 0 if (unw_get_proc_name (&cursor, name, sizeof (name), &offset) == 0
&& off > 0) && offset > 0)
snprintf (off, sizeof (off), "+0x%lx", (long) offset); snprintf (off, sizeof (off), "+0x%lx", (long) offset);
if (verbose) if (verbose)
printf (" [%lx] <%s%s>\n", (long) ip, name, off); printf (" [%lx] <%s%s>\n", (long) ip, name, off);