Coverity: Negative returns: CID 121
authorNelson Ferreira <nelson.ferreira@ieee.org>
Fri, 20 Jan 2012 15:38:36 +0000 (10:38 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Fri, 20 Jan 2012 15:38:36 +0000 (10:38 -0500)
* src/ui/TTY/objects-tty.c (tty_font_spec_matches_charset):
Actually fix the negative return issue, for the fatal crash case.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/ui/TTY/objects-tty.c

index 636dcfc..026a5d3 100644 (file)
@@ -505,6 +505,7 @@ tty_font_spec_matches_charset(struct device *d, Lisp_Object charset,
        assert(length>=0);
        if( length<0 ) {
                abort();
+               return -1;
        }
 
        the_nonreloc += offset;