X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fcommon%2Fsrc%2Fcathreadpool_pthreads.c;h=751bafc10008976816c89c94f08bc8fbb0069382;hb=17c68b2fd1e74586f85e552eeab4e32dc121f8a0;hp=744b1a575748bb5d822115917fa0b33ee5cff924;hpb=8c01dff2c5bc5496f7dc1632c498943ec6ecb015;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/common/src/cathreadpool_pthreads.c b/resource/csdk/connectivity/common/src/cathreadpool_pthreads.c index 744b1a5..751bafc 100644 --- a/resource/csdk/connectivity/common/src/cathreadpool_pthreads.c +++ b/resource/csdk/connectivity/common/src/cathreadpool_pthreads.c @@ -165,13 +165,13 @@ CAResult_t ca_thread_pool_add_task(ca_thread_pool_t thread_pool, ca_thread_func } ca_mutex_lock(thread_pool->details->list_lock); - CAResult_t addResult = u_arraylist_add(thread_pool->details->threads_list, (void*)threadHandle); + bool addResult = u_arraylist_add(thread_pool->details->threads_list, (void*)threadHandle); ca_mutex_unlock(thread_pool->details->list_lock); - if(addResult != CA_STATUS_OK) + if(!addResult) { OIC_LOG_V(ERROR, TAG, "Arraylist Add failed, may not be properly joined: %d", addResult); - return addResult; + return CA_STATUS_FAILED; } OIC_LOG(DEBUG, TAG, "OUT"); @@ -200,11 +200,7 @@ void ca_thread_pool_free(ca_thread_pool_t thread_pool) } } - CAResult_t freeres = u_arraylist_free(&(thread_pool->details->threads_list)); - if(CA_STATUS_OK != freeres) - { - OIC_LOG_V(ERROR, TAG, "Failed to free array list, error was: %d", freeres); - } + u_arraylist_free(&(thread_pool->details->threads_list)); ca_mutex_unlock(thread_pool->details->list_lock); ca_mutex_free(thread_pool->details->list_lock);