elf: use strncmp for comparison

We expect strncmp available on systems we build ELF parsers.
This commit is contained in:
Christian Hergert
2021-03-17 13:01:02 -07:00
parent 605cdfc3f1
commit 2c0ea406fd

View File

@ -154,7 +154,7 @@ sysprof_elf_symbol_resolver_load (SysprofSymbolResolver *resolver,
* files as we see them inside the user-space view of the system.
*/
if (memcmp (ev->filename, "/sysroot/", 9) == 0)
if (strncmp (ev->filename, "/sysroot/", 9) == 0)
filename = ev->filename + 9;
else
filename = ev->filename;