aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2017-07-04 12:51:53 +0100
committerMichael Brown <mcb30@ipxe.org>2017-07-04 12:51:53 +0100
commitc20da4fc5c3c3a3fd7a08b695e1624939bd6a911 (patch)
tree0ca86f2c7c24136c0bdac542d1a5fe1b4d8dc224
parent8e48d0df6b5a249e4f9f0759cc55a45af186b564 (diff)
downloadipxe-c20da4fc5c3c3a3fd7a08b695e1624939bd6a911.tar.gz
[mucurses] Avoid potential division by zero
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/hci/mucurses/slk.c3
1 files changed, 1 insertions, 2 deletions
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