From 8628c604693d71e5f032e93bddf1fbd15bd98f06 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Wed, 15 Mar 2017 18:14:13 -0400 Subject: [PATCH] Remove redundant code cppcheck reported: [speedread.c:151]: (style) Condition 'h<0' is always true Change-Id: I78fe0bbd205b0ca5b03a71ace81ef4f9b616e268 --- apps/plugins/speedread.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/plugins/speedread.c b/apps/plugins/speedread.c index c80839e4a9..b6fce77de1 100644 --- a/apps/plugins/speedread.c +++ b/apps/plugins/speedread.c @@ -147,9 +147,8 @@ static void cleanup(void) /* returns height of drawn area */ static int reset_drawing(long proportion) /* 16.16 fixed point, goes from 0 --> 1 over time */ { - int h = -1, w; - if(h < 0) - rb->lcd_getstringsize("X", &w, &h); + int w, h; + rb->lcd_getstringsize("X", &w, &h); /* clear word area */ rb->lcd_set_foreground(BACKGROUND_COLOR);