]> rtime.felk.cvut.cz Git - linux-conf-perf.git/commitdiff
parse_kconfig: fix SIGSEGV caused by wrong approach to expression negation
authorKarel Kočí <cynerd@email.cz>
Thu, 23 Apr 2015 10:12:30 +0000 (12:12 +0200)
committerKarel Kočí <cynerd@email.cz>
Thu, 23 Apr 2015 10:12:30 +0000 (12:12 +0200)
scripts/parse_kconfig/cnfexpr.c

index 2a22a3c7acb8237070fe2b6171a96caf3fe4ce3d..c9151bf13a58b89ab27f55807c31461369190a16 100644 (file)
@@ -151,9 +151,7 @@ struct cnfexpr *cnf_eql(struct symlist *sl, bool not, struct symbol *sym1,
         return fls;
     }
     if (!strcmp(sym2->name, "n")) {
-        struct cnfexpr *w = cnf_sym(sl, not, sym1);
-        w->exprs[0][0] *= -1;
-        return w;
+        return cnf_sym(sl, !not, sym1);
     }
     if (!strcmp(sym2->name, "y")) {
         return cnf_sym(sl, not, sym1);