From 83e35a73bd818032bd606966cf0fdbd9d9463b51 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 18 Dec 2018 02:24:19 -0800 Subject: [PATCH] remove dead code from parse() From Jessie's old static analysis report. 'prezero' was used in 3.4.3 when processing a count for 'multi', but count handling is now done in a separate routine and 'prezero' in parse() never changes value, so get rid of it. --- src/cmd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 0cbcaba66..f05787fe3 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1544920233 2018/12/16 00:30:33 $ $NHDT-Branch: win-minor $:$NHDT-Revision: 1.321 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1545128652 2018/12/18 10:24:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.322 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -5544,7 +5544,6 @@ parse() static char in_line[COLNO]; #endif register int foo; - boolean prezero = FALSE; iflags.in_parse = TRUE; multi = 0; @@ -5617,8 +5616,6 @@ parse() in_line[2] = 0; } clear_nhwindow(WIN_MESSAGE); - if (prezero) - in_line[0] = Cmd.spkeys[NHKF_ESC]; iflags.in_parse = FALSE; return in_line; -- 2.40.0