]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[mucurses] Avoid potential division by zero
authorMichael Brown <mcb30@ipxe.org>
Tue, 4 Jul 2017 11:51:53 +0000 (12:51 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 4 Jul 2017 11:51:53 +0000 (12:51 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/hci/mucurses/slk.c

index 169e0120bdc6261a3c12bf9d155aaa0a1a78656c..2a57b1dee0829e668cc133da06985d71011d4d01 100644 (file)
@@ -269,8 +269,7 @@ int slk_init ( int fmt ) {
                slks->spaces[0] = 3; slks->spaces[1] = 7;
                break;
        default:
-               nblocks = 0; nmaj = 0; nmin = 0;
-               break;
+               return ERR;
        }
 
        // determine maximum label length and major space size