From: Anatoly Burakov Date: Mon, 11 Jun 2018 20:55:34 +0000 (+0100) Subject: fbarray: fix errno values returned from functions X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a148861aa8c84e7af4962a387cb886706778d6af;p=dpdk.git fbarray: fix errno values returned from functions Errno values are supposed to be positive, yet they were negative. This changes API, so not backporting. Fixes: c44d09811b40 ("eal: add shared indexed file-backed array") Signed-off-by: Anatoly Burakov --- diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c index 019f84c186..9ae942bfec 100644 --- a/lib/librte_eal/common/eal_common_fbarray.c +++ b/lib/librte_eal/common/eal_common_fbarray.c @@ -231,7 +231,7 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n, return MASK_GET_IDX(msk_idx, run_start); } /* we didn't find anything */ - rte_errno = used ? -ENOENT : -ENOSPC; + rte_errno = used ? ENOENT : ENOSPC; return -1; } @@ -287,7 +287,7 @@ find_next(const struct rte_fbarray *arr, unsigned int start, bool used) return MASK_GET_IDX(idx, found); } /* we didn't find anything */ - rte_errno = used ? -ENOENT : -ENOSPC; + rte_errno = used ? ENOENT : ENOSPC; return -1; }