Skip to content

Commit

Permalink
test/mem: fix error check
Browse files Browse the repository at this point in the history
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.

Fixes: 086d426 ("test/mem: fix memory autotests on FreeBSD")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
  • Loading branch information
Jie Zhou authored and tmonjalo committed Feb 8, 2022
1 parent 987d40a commit 068cdfa
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 068cdfa

Please sign in to comment.