diff options
author | Stuart Haslam <stuart.haslam@linaro.org> | 2015-04-27 17:48:02 +0100 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-04-29 09:37:17 +0300 |
commit | b9d0dcb9bee6b8327b92e109faf4366f69899428 (patch) | |
tree | 0ea27a763be93856f7a199492fc861aa52cd518d /test/performance/odp_pktio_perf.c | |
parent | 312c207bc9f043ee62940ee554eea49b76fe80e0 (diff) |
performance: pktio: test return value of odp_pktio_close()
Coverity complains that the return value of odp_pktio_close() isn't
being checked.
This fixes https://bugs.linaro.org/show_bug.cgi?id=1513
Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/performance/odp_pktio_perf.c')
-rw-r--r-- | test/performance/odp_pktio_perf.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index 0be8d46..e24ceb5 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -746,10 +746,19 @@ static int test_term(void) int i; int ret = 0; - if (gbl_args->pktio_tx != gbl_args->pktio_rx) - odp_pktio_close(gbl_args->pktio_tx); + if (gbl_args->pktio_tx != gbl_args->pktio_rx) { + if (odp_pktio_close(gbl_args->pktio_tx) != 0) { + LOG_ERR("Failed to close pktio_tx\n"); + ret = -1; + } + } + destroy_inq(gbl_args->pktio_rx); - odp_pktio_close(gbl_args->pktio_rx); + + if (odp_pktio_close(gbl_args->pktio_rx) != 0) { + LOG_ERR("Failed to close pktio_rx\n"); + ret = -1; + } for (i = 0; i < gbl_args->args.num_ifaces; ++i) { snprintf(pool_name, sizeof(pool_name), |