From 71479b7922d693f4bea5b5985d0422d4567994fc Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Wed, 5 Jul 2017 14:30:20 -0700 Subject: [PATCH] Fix missing height check found by /analyze A recent run of the experimental VC++ /analyze builder gave this warning: skia\src\gpu\gl\grglgpu.cpp(851) : warning C6287: Redundant code: the left and right sub-expressions are identical. The code it complained about was this: if (width < 0 || width < 0) { which was introduced in https://skia-review.googlesource.com/c/20445/ This change makes the obvious fix. Change-Id: I9d1743293fac9dd15ed82cf85efef907d727921e Reviewed-on: https://skia-review.googlesource.com/21620 Reviewed-by: Jim Van Verth Reviewed-by: Bruce Dawson Commit-Queue: Jim Van Verth --- src/gpu/gl/GrGLGpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 861542fd1d..bcc74af29a 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -848,7 +848,7 @@ bool GrGLGpu::onTransferPixels(GrTexture* texture, rowBytes = trimRowBytes; } const void* pixels = (void*)offset; - if (width < 0 || width < 0) { + if (width < 0 || height < 0) { return false; }