Skip to content

Commit 1e23c4d

Browse files
yliu80Eddie Dong
authored andcommitted
dm: ioc: clean up assert
This patch is to clean up assert from ioc Tracked-On: #3252 Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
1 parent 8740232 commit 1e23c4d

File tree

1 file changed

+2
-7
lines changed
  • devicemodel/hw/platform

1 file changed

+2
-7
lines changed

devicemodel/hw/platform/ioc.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
#include <stdio.h>
5454
#include <stdlib.h>
5555
#include <unistd.h>
56-
#include <assert.h>
5756
#include <errno.h>
5857
#include <fcntl.h>
5958
#include <pty.h>
@@ -1329,7 +1328,6 @@ ioc_rx_thread(void *arg)
13291328
struct ioc_dev *ioc = (struct ioc_dev *) arg;
13301329
struct cbc_request *req = NULL;
13311330
struct cbc_pkt packet;
1332-
int err;
13331331

13341332
memset(&packet, 0, sizeof(packet));
13351333
packet.cfg = &ioc->rx_config;
@@ -1338,8 +1336,7 @@ ioc_rx_thread(void *arg)
13381336
for (;;) {
13391337
pthread_mutex_lock(&ioc->rx_mtx);
13401338
while (SIMPLEQ_EMPTY(&ioc->rx_qhead)) {
1341-
err = pthread_cond_wait(&ioc->rx_cond, &ioc->rx_mtx);
1342-
assert(err == 0);
1339+
pthread_cond_wait(&ioc->rx_cond, &ioc->rx_mtx);
13431340
if (ioc->closing)
13441341
goto exit;
13451342
}
@@ -1382,7 +1379,6 @@ ioc_tx_thread(void *arg)
13821379
struct ioc_dev *ioc = (struct ioc_dev *) arg;
13831380
struct cbc_request *req = NULL;
13841381
struct cbc_pkt packet;
1385-
int err;
13861382

13871383
memset(&packet, 0, sizeof(packet));
13881384
packet.cfg = &ioc->tx_config;
@@ -1391,8 +1387,7 @@ ioc_tx_thread(void *arg)
13911387
for (;;) {
13921388
pthread_mutex_lock(&ioc->tx_mtx);
13931389
while (SIMPLEQ_EMPTY(&ioc->tx_qhead)) {
1394-
err = pthread_cond_wait(&ioc->tx_cond, &ioc->tx_mtx);
1395-
assert(err == 0);
1390+
pthread_cond_wait(&ioc->tx_cond, &ioc->tx_mtx);
13961391
if (ioc->closing)
13971392
goto exit;
13981393
}

0 commit comments

Comments
 (0)