Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/loongarch-compilation | warning | apply patch failure |
ci/iol-testing | warning | apply patch failure |
Commit Message
huangdengdui
Nov. 4, 2024, 11:09 a.m. UTC
In the libc function, rte_errno is not assigned a value. Therefore, errno should be used instead of it. Fixes: c4b89ecb64ea ("eal: introduce memory management wrappers") Cc: stable@dpdk.org Signed-off-by: Dengdui Huang <huangdengdui@huawei.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Huisong Li <lihuisong@huawei.com> --- lib/eal/unix/eal_unix_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/eal/unix/eal_unix_memory.c b/lib/eal/unix/eal_unix_memory.c index 97969a401b..4fd066a290 100644 --- a/lib/eal/unix/eal_unix_memory.c +++ b/lib/eal/unix/eal_unix_memory.c @@ -84,7 +84,7 @@ eal_mem_set_dump(void *virt, size_t size, bool dump) int ret = madvise(virt, size, flags); if (ret) { EAL_LOG(DEBUG, "madvise(%p, %#zx, %d) failed: %s", - virt, size, flags, strerror(rte_errno)); + virt, size, flags, strerror(errno)); rte_errno = errno; } return ret;