Commit 7705e6e4 authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

kconfig: make rand{,package}config fair



Give each boolean symbol a 50% chance of getting enabled, rather than 67%.

Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 6ef765d3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -864,7 +864,8 @@ void conf_set_all_new_symbols(enum conf_def_mode mode)
				sym->def[S_DEF_USER].tri = no;
				break;
			case def_random:
				sym->def[S_DEF_USER].tri = (tristate)(rand() % 3);
				cnt = sym_get_type(sym) == S_TRISTATE ? 3 : 2;
				sym->def[S_DEF_USER].tri = (tristate)(rand() % cnt);
				break;
			default:
				continue;