[coreboot-gerrit] Patch set updated for coreboot: libpayload/drivers/video: Improve check in if condition
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Wed Dec 14 16:13:21 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17837
-gerrit
commit f81495f98c5b78a1a1a6327b4e469dacbc9237fb
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Tue Dec 13 15:55:26 2016 +0100
libpayload/drivers/video: Improve check in if condition
Coverity considers this a copy&paste error, and maybe it is. In any
case, it makes sense to check the variable that (if the condition is
true) is changed, and the values are the same before that test, so the
change is harmless.
Change-Id: I163c6a9f5baa05e715861dc19643b19a9c79c883
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Found-by: Coverity Scan #1347376
---
payloads/libpayload/drivers/video/graphics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/drivers/video/graphics.c b/payloads/libpayload/drivers/video/graphics.c
index 943f8ed..f1d916a 100644
--- a/payloads/libpayload/drivers/video/graphics.c
+++ b/payloads/libpayload/drivers/video/graphics.c
@@ -322,7 +322,7 @@ static int draw_bitmap_v3(const struct vector *top_left,
for (d.y = 0; d.y < dim->height; d.y++, p.y += dir) {
s0.y = d.y * scale->y.d / scale->y.n;
s1.y = s0.y;
- if (s0.y + 1 < dim_org->height)
+ if (s1.y + 1 < dim_org->height)
s1.y++;
ty.d = scale->y.n;
ty.n = (d.y * scale->y.d) % scale->y.n;
More information about the coreboot-gerrit
mailing list