1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-29 16:44:03 +00:00

libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum

PR:             273966
Reviewed by:	emaste
This commit is contained in:
John Hein 2023-09-21 17:43:05 -06:00 committed by Ed Maste
parent 7a0e9e3f8f
commit 633094c27f

View File

@ -119,7 +119,7 @@ procstat_core_open(const char *filename)
warnx("%s is not a CORE file", filename);
goto fail;
}
if (elf_getphnum(e, &nph) == 0) {
if (elf_getphdrnum(e, &nph) == -1) {
warnx("program headers not found");
goto fail;
}