aboutsummaryrefslogtreecommitdiff
path: root/scripts/parse_kconfig/boolexpr.c
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-09-17 13:03:02 +0200
committerKarel Kočí <cynerd@email.cz>2015-09-17 13:03:02 +0200
commit08d906b110f6a1a9985c4e03a13a2a97b0aaf818 (patch)
treea2ce6d3a4d0b39ed01064c6d21da911d417f5cf1 /scripts/parse_kconfig/boolexpr.c
parent610845c6f99412010baa7a84ff8880bc7046c49a (diff)
downloadlinux-conf-perf-08d906b110f6a1a9985c4e03a13a2a97b0aaf818.tar.gz
linux-conf-perf-08d906b110f6a1a9985c4e03a13a2a97b0aaf818.tar.bz2
linux-conf-perf-08d906b110f6a1a9985c4e03a13a2a97b0aaf818.zip
Fix parse_kconfig symbol default
Generated rules for symbols default values was used without information about their order. Kconfig documentation specifies that only first valid default value specification should be used.
Diffstat (limited to 'scripts/parse_kconfig/boolexpr.c')
-rw-r--r--scripts/parse_kconfig/boolexpr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/parse_kconfig/boolexpr.c b/scripts/parse_kconfig/boolexpr.c
index b6f008d..0595461 100644
--- a/scripts/parse_kconfig/boolexpr.c
+++ b/scripts/parse_kconfig/boolexpr.c
@@ -286,6 +286,7 @@ void boolexpr_free(struct boolexpr *e) {
}
struct boolexpr *boolexpr_copy(struct boolexpr *e) {
+ struct boolexpr *cop = e;
struct boolexpr **stack;
size_t stack_size = 2, stack_pos = 0;
stack = malloc(stack_size * sizeof(struct boolexpr *));
@@ -311,5 +312,5 @@ struct boolexpr *boolexpr_copy(struct boolexpr *e) {
}
}
free(stack);
- return e;
+ return cop;
}