summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-08-18 17:20:28 +0100
committerVincent Sanders <vince@kyllikki.org>2014-08-18 17:20:28 +0100
commitee3247f532a605e09fea3461344536730e77ee04 (patch)
treeae2ad75348a28841f22b4878c5850c20db2717bb /framebuffer
parent1a71a84b6268bd24a306f7bad87cdd88c2d95e78 (diff)
downloadnetsurf-ee3247f532a605e09fea3461344536730e77ee04.tar.gz
netsurf-ee3247f532a605e09fea3461344536730e77ee04.tar.bz2
remove logically dead code path (coverity 1231842)
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/convert_font.c19
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;