diff options
author | Franklin Wei <git@fwei.tk> | 2017-03-15 18:14:13 -0400 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2017-03-15 18:14:13 -0400 |
commit | 8628c604693d71e5f032e93bddf1fbd15bd98f06 (patch) | |
tree | 697af086ecdfcdb2d64725ed348b85df7b373afc /apps | |
parent | 9ecabc0a75b61ef6136b9fa37eaf1fb3da414855 (diff) |
Remove redundant code
cppcheck reported: [speedread.c:151]: (style) Condition 'h<0' is always true
Change-Id: I78fe0bbd205b0ca5b03a71ace81ef4f9b616e268
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/speedread.c | 5 |
1 files 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); |