From d672ea3051d024fa696f2db6ce34dd76db86e790 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 9 Jan 2024 16:36:50 -0800 Subject: [PATCH] remove redundant mktrap() tests The 'tm' and 'croom' ?: tests introduced to this sprintf() a couple of days ago will both always yield their else clause because execution will only get into the block when they're Null (due to if (!tm && !croom && ...) {} that isn't visible in the diff's context). --- src/mklev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mklev.c b/src/mklev.c index f80f538fe..d34136fff 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -1741,8 +1741,7 @@ mktrap( Snprintf(errbuf, sizeof errbuf, "args (%d,%d,%s,%s) are invalid", - num, mktrapflags, croom ? "[room]" : "null room", - tm ? "" : "null location"); + num, mktrapflags, "null room", "null location"); paniclog("mktrap", errbuf); } return;