[PATCH v5 01/52] eal: fix use rte errno for libc function

Dengdui Huang huangdengdui at huawei.com
Mon Nov 4 12:09:46 CET 2024


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 at dpdk.org

Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Huisong Li <lihuisong at 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;
-- 
2.33.0



More information about the dev mailing list