Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: remove unneeded code in expr_compare_type()

The condition (t2 == 0) never becomes true because the zero value
(i.e., E_NONE) is only used as a dummy type for prevtoken. It can
be passed to t1, but not to t2.

The caller of this function only checks expr_compare_type() > 0.
Therefore, the distinction between 0 and -1 is unnecessary.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+1 -4
+1 -4
scripts/kconfig/expr.c
··· 1096 1096 case E_OR: 1097 1097 if (t2 == E_LIST) 1098 1098 return 1; 1099 - case E_LIST: 1100 - if (t2 == 0) 1101 - return 1; 1102 1099 default: 1103 - return -1; 1100 + break; 1104 1101 } 1105 1102 return 0; 1106 1103 }