aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hein <jcfyecrayz@liamekaens.com>2023-09-21 23:43:05 +0000
committerEd Maste <emaste@FreeBSD.org>2023-09-22 01:47:26 +0000
commit633094c27f0ac1b1001d5bd24a883240b4bce1dc (patch)
treeab072605c4b65cd4d0b36e8ae7ab7180be9a269d
parent7a0e9e3f8f3a9379df793284f719f1a7ee5734c2 (diff)
-rw-r--r--lib/libprocstat/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c
index dea078c848eb..cf3435a10c79 100644
--- a/lib/libprocstat/core.c
+++ b/lib/libprocstat/core.c
@@ -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;
}