From 764c197c6fc2bf10b038c33b320a4e95594d52d8 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 19 Nov 2012 16:50:24 -0800 Subject: [PATCH] fix typo that broke all the builds Bug: 7584338 Change-Id: Ieb8c27a544ac583af9aa1e0376e33a673d2d9673 --- libs/gui/BufferQueue.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp index 607e0bdbe..086e29819 100644 --- a/libs/gui/BufferQueue.cpp +++ b/libs/gui/BufferQueue.cpp @@ -314,12 +314,9 @@ status_t BufferQueue::dequeueBuffer(int *outBuf, sp& outFence, * the consumer may still have pending reads of the * buffers in flight. */ - if (found >= 0) { - bool isOlder = mSlots[i].mFrameNumber < - mSlots[found].mFrameNumber; - if (isOlder) { - found = i; - } + if ((found < 0) || + mSlots[i].mFrameNumber < mSlots[found].mFrameNumber) { + found = i; } } }