diff --git a/kernel/base/ipc/los_futex.c b/kernel/base/ipc/los_futex.c index 5ce2054f3807e3c5888174c66f2773b31bef493c..b04ce692c938a4441d1e0d1a27103a3211d07191 100755 --- a/kernel/base/ipc/los_futex.c +++ b/kernel/base/ipc/los_futex.c @@ -319,15 +319,11 @@ STATIC VOID OsFutexInsertNewFutexKeyToHash(FutexNode *node) futexList != &(hashNode->lockList); futexList = futexList->pstNext) { headNode = OS_FUTEX_FROM_FUTEXLIST(futexList); - if (node->key > headNode->key) { - continue; - } else if (node->key < headNode->key) { + if (node->key <= headNode->key) { LOS_ListTailInsert(&(headNode->futexList), &(node->futexList)); break; } - - LOS_ListTailInsert(&(headNode->futexList), &(node->futexList)); - break; + } EXIT: