From 92ddfcfff5cec32456e2d1e0d96671f1eb0e2986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Mon, 17 Nov 2014 22:01:27 +0100 Subject: Fix incorrect usage of bool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A bool can't be < 0 Change-Id: Ie94ffadcb38c95214d1105c02610e59b4b2872b2 Signed-off-by: Bernhard Rosenkränzer --- core/jni/android/graphics/pdf/PdfEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/jni/android') diff --git a/core/jni/android/graphics/pdf/PdfEditor.cpp b/core/jni/android/graphics/pdf/PdfEditor.cpp index 5f60c9e..66d1722 100644 --- a/core/jni/android/graphics/pdf/PdfEditor.cpp +++ b/core/jni/android/graphics/pdf/PdfEditor.cpp @@ -124,7 +124,7 @@ static bool writeAllBytes(const int fd, const void* buffer, const size_t byteCou static int writeBlock(FPDF_FILEWRITE* owner, const void* buffer, unsigned long size) { const PdfToFdWriter* writer = reinterpret_cast(owner); const bool success = writeAllBytes(writer->dstFd, buffer, size); - if (success < 0) { + if (!success) { ALOGE("Cannot write to file descriptor. Error:%d", errno); return 0; } -- cgit v1.1