From 39f4ffbcdc18c2c178298bf6673f8b33208f76d1 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 25 Jul 2016 22:44:13 -0700 Subject: [PATCH] utils/thread.c,cosmetics: join a few lines Change-Id: I94c142fc6f9e6823ce16ca723145354eae4db9af --- src/utils/thread.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/thread.c b/src/utils/thread.c index 93f76227..b8798f56 100644 --- a/src/utils/thread.c +++ b/src/utils/thread.c @@ -183,8 +183,7 @@ static int pthread_cond_wait(pthread_cond_t* const condition, #else // note that there is a consumer available so the signal isn't dropped in // pthread_cond_signal - if (!ReleaseSemaphore(condition->waiting_sem_, 1, NULL)) - return 1; + if (!ReleaseSemaphore(condition->waiting_sem_, 1, NULL)) return 1; // now unlock the mutex so pthread_cond_signal may be issued pthread_mutex_unlock(mutex); ok = (WaitForSingleObject(condition->signal_event_, INFINITE) == @@ -226,8 +225,7 @@ static THREADFN ThreadLoop(void* ptr) { } // main thread state control -static void ChangeState(WebPWorker* const worker, - WebPWorkerStatus new_status) { +static void ChangeState(WebPWorker* const worker, WebPWorkerStatus new_status) { // No-op when attempting to change state on a thread that didn't come up. // Checking status_ without acquiring the lock first would result in a data // race.