From 1e23c4dc4194b993de34e8ebe4f5f06dfabcfc5a Mon Sep 17 00:00:00 2001 From: Yuan Liu Date: Thu, 13 Jun 2019 15:57:42 +0800 Subject: [PATCH] dm: ioc: clean up assert This patch is to clean up assert from ioc Tracked-On: #3252 Signed-off-by: Yuan Liu Reviewed-by: Shuo A Liu --- devicemodel/hw/platform/ioc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/devicemodel/hw/platform/ioc.c b/devicemodel/hw/platform/ioc.c index 5d1133759..7e01a5380 100644 --- a/devicemodel/hw/platform/ioc.c +++ b/devicemodel/hw/platform/ioc.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -1329,7 +1328,6 @@ ioc_rx_thread(void *arg) struct ioc_dev *ioc = (struct ioc_dev *) arg; struct cbc_request *req = NULL; struct cbc_pkt packet; - int err; memset(&packet, 0, sizeof(packet)); packet.cfg = &ioc->rx_config; @@ -1338,8 +1336,7 @@ ioc_rx_thread(void *arg) for (;;) { pthread_mutex_lock(&ioc->rx_mtx); while (SIMPLEQ_EMPTY(&ioc->rx_qhead)) { - err = pthread_cond_wait(&ioc->rx_cond, &ioc->rx_mtx); - assert(err == 0); + pthread_cond_wait(&ioc->rx_cond, &ioc->rx_mtx); if (ioc->closing) goto exit; } @@ -1382,7 +1379,6 @@ ioc_tx_thread(void *arg) struct ioc_dev *ioc = (struct ioc_dev *) arg; struct cbc_request *req = NULL; struct cbc_pkt packet; - int err; memset(&packet, 0, sizeof(packet)); packet.cfg = &ioc->tx_config; @@ -1391,8 +1387,7 @@ ioc_tx_thread(void *arg) for (;;) { pthread_mutex_lock(&ioc->tx_mtx); while (SIMPLEQ_EMPTY(&ioc->tx_qhead)) { - err = pthread_cond_wait(&ioc->tx_cond, &ioc->tx_mtx); - assert(err == 0); + pthread_cond_wait(&ioc->tx_cond, &ioc->tx_mtx); if (ioc->closing) goto exit; }