Skip to content

Commit

Permalink
test/mem: fix error check
Browse files Browse the repository at this point in the history
[ upstream commit 068cdfa ]

Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.

Fixes: 086d426 ("test/mem: fix memory autotests on FreeBSD")

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
  • Loading branch information
Jie Zhou authored and bluca committed Feb 17, 2022
1 parent 2da6c30 commit d3f8892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/test/test_memory.c
Expand Up @@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
if (errno == ENOTSUP)
if (rte_errno == ENOTSUP)
return 1;
return -1;
}
Expand Down

0 comments on commit d3f8892

Please sign in to comment.