提交 0e0ab81f 编写于 作者: B boxi

fix: Correctly handle the return value of LOS_EventRead in QuickstartListen.

Correctly handle the return value of LOS_EventRead in QuickstartListen.

Close #I3PSLZ

Change-Id: I7b9ab9aa0542b6072dcbe8fa78924125b95c6434
上级 4e24b572
......@@ -72,7 +72,7 @@ static int QuickstartListen(unsigned long arg)
/* 16:low 16 bits for eventMask, high 16 bits for pid */
unsigned int mask = (listenMask.pid << 16) | listenMask.events;
int ret = LOS_EventRead((PEVENT_CB_S)&g_qsEvent, mask, LOS_WAITMODE_AND | LOS_WAITMODE_CLR, LOS_WAIT_FOREVER);
if (ret != 0) {
if (ret != mask) {
PRINT_ERR("%s,%d:0x%x\n", __FUNCTION__, __LINE__, ret);
ret = -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册