diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-08-18 17:20:28 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-08-18 17:20:28 +0100 |
commit | ee3247f532a605e09fea3461344536730e77ee04 (patch) | |
tree | ae2ad75348a28841f22b4878c5850c20db2717bb | |
parent | 1a71a84b6268bd24a306f7bad87cdd88c2d95e78 (diff) | |
download | netsurf-ee3247f532a605e09fea3461344536730e77ee04.tar.gz netsurf-ee3247f532a605e09fea3461344536730e77ee04.tar.bz2 |
remove logically dead code path (coverity 1231842)
-rw-r--r-- | framebuffer/convert_font.c | 19 |
1 files changed, 9 insertions, 10 deletions
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; |