]> granicus.if.org Git - nethack/commitdiff
remove unnecessary null-check on parsesymbols()
authorSHIRAKATA Kentaro <argrath@ub32.org>
Sun, 5 Jun 2022 07:22:21 +0000 (16:22 +0900)
committerSHIRAKATA Kentaro <argrath@ub32.org>
Tue, 7 Jun 2022 20:28:32 +0000 (05:28 +0900)
`strval` here is always non-null,
because the null-check is done in earlier code.

src/symbols.c

index 2b2d9f21fb16fd86542217e427593a4078516b7a..42fbbd1ea1a4dd9a8f4ebd4f10927bbd23372ff8 100644 (file)
@@ -704,7 +704,7 @@ parsesymbols(register char *opts, int which_set)
 #endif
 
             if ((g.symset[which_set].handling == H_UTF8)
-                || (strval && (lowc(strval[0]) == 'u') && (strval[1] == '+'))) {
+                || (lowc(strval[0]) == 'u') && (strval[1] == '+')) {
 #ifdef ENHANCED_SYMBOLS
                 char buf[BUFSZ];