From 4e7de83d81baee96116e823f29926222661ceb15 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 13 May 2024 23:32:52 +0200 Subject: [PATCH] play.c: Replace NULL check by assertion. If p is NULL, kma contains no colon, and we should not be here in the first place. Instead, we should have errored out much earlier in the command line parser. Suggested-by: gcc(1) --- play.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/play.c b/play.c index bd183b6b..4adedcc0 100644 --- a/play.c +++ b/play.c @@ -580,8 +580,7 @@ static char *get_user_key_map_seq(int key) char *result; int len; - if (!p) - return NULL; + assert(p); len = p - kma; result = alloc(len + 1); memcpy(result, kma, len); -- 2.39.2