diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-24 01:03:44 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-24 01:03:44 +0000 |
commit | 528ee194626270329b1c482cd7bd7502d01bcd1f (patch) | |
tree | deb3041729a79fcc8b5e053540100ead9d6dde5a | |
parent | 1df12f9e1a0e9576ce3706e40bb076d343bb92ce (diff) | |
parent | 42574fdfa1783ff3b218a0b1a28a0fd4e8956898 (diff) | |
download | platform_hardware_nxp_nfc-android11-security-release.tar.gz platform_hardware_nxp_nfc-android11-security-release.tar.bz2 platform_hardware_nxp_nfc-android11-security-release.zip |
Snap for 6424828 from 42574fdfa1783ff3b218a0b1a28a0fd4e8956898 to rvc-releaseandroid-vts-11.0_r5android-vts-11.0_r4android-vts-11.0_r3android-vts-11.0_r2android-vts-11.0_r1android-security-11.0.0_r1android-cts-11.0_r5android-cts-11.0_r4android-cts-11.0_r3android-cts-11.0_r2android-cts-11.0_r1android-11.0.0_r5android-11.0.0_r4android-11.0.0_r3android-11.0.0_r25android-11.0.0_r2android-11.0.0_r17android-11.0.0_r1android11-tests-releaseandroid11-security-releaseandroid11-s1-releaseandroid11-release
Change-Id: I2798fe1480c4d846cc00c5fe411d3d55413f59d0
-rwxr-xr-x | halimpl/tml/phDal4Nfc_messageQueueLib.cc | 2 | ||||
-rw-r--r-- | halimpl/tml/phTmlNfc.cc | 2 | ||||
-rw-r--r-- | halimpl/utils/phNxpNciHal_utils.cc | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/halimpl/tml/phDal4Nfc_messageQueueLib.cc b/halimpl/tml/phDal4Nfc_messageQueueLib.cc index f43774d..e3c70b8 100755 --- a/halimpl/tml/phDal4Nfc_messageQueueLib.cc +++ b/halimpl/tml/phDal4Nfc_messageQueueLib.cc @@ -59,7 +59,7 @@ intptr_t phDal4Nfc_msgget(key_t key, int msgflg) { (phDal4Nfc_message_queue_t*)malloc(sizeof(phDal4Nfc_message_queue_t)); if (pQueue == NULL) return -1; memset(pQueue, 0, sizeof(phDal4Nfc_message_queue_t)); - if (pthread_mutex_init(&pQueue->nCriticalSectionMutex, NULL) == -1) { + if (pthread_mutex_init(&pQueue->nCriticalSectionMutex, NULL) != 0) { free(pQueue); return -1; } diff --git a/halimpl/tml/phTmlNfc.cc b/halimpl/tml/phTmlNfc.cc index 643764d..b3135c1 100644 --- a/halimpl/tml/phTmlNfc.cc +++ b/halimpl/tml/phTmlNfc.cc @@ -113,7 +113,7 @@ NFCSTATUS phTmlNfc_Init(pphTmlNfc_Config_t pConfig) { gpphTmlNfc_Context->tReadInfo.bThreadBusy = false; gpphTmlNfc_Context->tWriteInfo.bThreadBusy = false; if (pthread_mutex_init(&gpphTmlNfc_Context->readInfoUpdateMutex, - NULL) == -1) { + NULL) != 0) { wInitStatus = NFCSTATUS_FAILED; } else if (0 != sem_init(&gpphTmlNfc_Context->rxSemaphore, 0, 0)) { wInitStatus = NFCSTATUS_FAILED; diff --git a/halimpl/utils/phNxpNciHal_utils.cc b/halimpl/utils/phNxpNciHal_utils.cc index c1a14f4..57aa819 100644 --- a/halimpl/utils/phNxpNciHal_utils.cc +++ b/halimpl/utils/phNxpNciHal_utils.cc @@ -36,7 +36,7 @@ *******************************************************************************/ int listInit(struct listHead* pList) { pList->pFirst = NULL; - if (pthread_mutex_init(&pList->mutex, NULL) == -1) { + if (pthread_mutex_init(&pList->mutex, NULL) != 0) { NXPLOG_NCIHAL_E("Mutex creation failed (errno=0x%08x)", errno); return 0; } @@ -59,7 +59,7 @@ int listDestroy(struct listHead* pList) { bListNotEmpty = listGetAndRemoveNext(pList, NULL); } - if (pthread_mutex_destroy(&pList->mutex) == -1) { + if (pthread_mutex_destroy(&pList->mutex) != 0) { NXPLOG_NCIHAL_E("Mutex destruction failed (errno=0x%08x)", errno); return 0; } @@ -266,12 +266,12 @@ phNxpNciHal_Monitor_t* phNxpNciHal_init_monitor(void) { if (nxpncihal_monitor != NULL) { memset(nxpncihal_monitor, 0x00, sizeof(phNxpNciHal_Monitor_t)); - if (pthread_mutex_init(&nxpncihal_monitor->reentrance_mutex, NULL) == -1) { + if (pthread_mutex_init(&nxpncihal_monitor->reentrance_mutex, NULL) != 0) { NXPLOG_NCIHAL_E("reentrance_mutex creation returned 0x%08x", errno); goto clean_and_return; } - if (pthread_mutex_init(&nxpncihal_monitor->concurrency_mutex, NULL) == -1) { + if (pthread_mutex_init(&nxpncihal_monitor->concurrency_mutex, NULL) != 0) { NXPLOG_NCIHAL_E("concurrency_mutex creation returned 0x%08x", errno); pthread_mutex_destroy(&nxpncihal_monitor->reentrance_mutex); goto clean_and_return; |