From ee3247f532a605e09fea3461344536730e77ee04 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 18 Aug 2014 17:20:28 +0100 Subject: remove logically dead code path (coverity 1231842) --- framebuffer/convert_font.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'framebuffer') diff --git a/framebuffer/convert_font.c b/framebuffer/convert_font.c index 7c7a16a4f..a71d81bc8 100644 --- a/framebuffer/convert_font.c +++ b/framebuffer/convert_font.c @@ -505,16 +505,15 @@ static bool check_glyph_data_valid(int pos, char c) } else { return true; } - } else if (offset >= 3) { - if (c != '.' && c != '#' && c != ' ') { - LOG(LOG_ERROR, " Invalid glyph data: " - "expecting '.', '#', or ' ', " - "got '%c' (%i)\n", - c, c); - return false; - } else { - return true; - } + } + + /* offset must be >=3 */ + if (c != '.' && c != '#' && c != ' ') { + LOG(LOG_ERROR, " Invalid glyph data: " + "expecting '.', '#', or ' ', " + "got '%c' (%i)\n", + c, c); + return false; } return true; -- cgit v1.2.3