From: Michael Brown Date: Tue, 4 Jul 2017 11:51:53 +0000 (+0100) Subject: [mucurses] Avoid potential division by zero X-Git-Tag: v1.20.1~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c20da4fc5c3c3a3fd7a08b695e1624939bd6a911;p=thirdparty%2Fipxe.git [mucurses] Avoid potential division by zero Signed-off-by: Michael Brown --- diff --git a/src/hci/mucurses/slk.c b/src/hci/mucurses/slk.c index 169e0120b..2a57b1dee 100644 --- a/src/hci/mucurses/slk.c +++ b/src/hci/mucurses/slk.c @@ -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