From 80767d52e5ab3c2669b96749c49d80a34f1b2fb5 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 5 Mar 2018 20:51:27 +0100 Subject: Move 'val' initialization a bit later in tri_value() Makes it harder to miss. --- kconfiglib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kconfiglib.py b/kconfiglib.py index f378dc5..93dc577 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2813,12 +2813,13 @@ class Symbol(object): self._cached_tri_val = 0 return 0 - val = 0 # Warning: See Symbol._rec_invalidate(), and note that this is a hidden # function call (property magic) vis = self.visibility self._write_to_conf = (vis != 0) + val = 0 + if not self.choice: # Non-choice symbol -- cgit v1.2.3