diff options
author | Zoltan Kiss <zoltan.kiss@linaro.org> | 2016-01-14 17:33:13 +0000 |
---|---|---|
committer | Zoltan Kiss <zoltan.kiss@linaro.org> | 2016-01-14 17:35:43 +0000 |
commit | c67e7869ee82f6bbfbba82988d8f128d2598f1bd (patch) | |
tree | f8f260ff57ddcd0a67fde60a7a7e7da751b838ee /platform/linux-dpdk | |
parent | d1e6e2c9fde01a0be11712656c44fe095c02cb75 (diff) |
linux-dpdk: init: fix return value checking
rte_eal_init() returns the consumed arguments, but it doesn't count the
first one, which is used only as a logging prefix. Count this when
checking return value.
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Diffstat (limited to 'platform/linux-dpdk')
-rw-r--r-- | platform/linux-dpdk/odp_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/linux-dpdk/odp_init.c b/platform/linux-dpdk/odp_init.c index 3f1328dfa..7fc5ecd5e 100644 --- a/platform/linux-dpdk/odp_init.c +++ b/platform/linux-dpdk/odp_init.c @@ -218,9 +218,9 @@ int odp_init_dpdk(const char *cmdline) if (i < 0) { ODP_ERR("Cannot init the Intel DPDK EAL!\n"); return -1; - } else if (i != dpdk_argc) { + } else if (i + 1 != dpdk_argc) { ODP_DBG("Some DPDK args were not processed!\n"); - ODP_DBG("Passed: %d Consumed %d\n", dpdk_argc, i); + ODP_DBG("Passed: %d Consumed %d\n", dpdk_argc, i + 1); } ODP_DBG("rte_eal_init OK\n"); |