kconfig: do not use OR-assignment for zero-cleared structure
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 13 Apr 2020 15:33:20 +0000 (00:33 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 5 Feb 2021 10:55:18 +0000 (11:55 +0100)
The simple assignment is enough because memset() three lines above
has zero-cleared the structure.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/symbol.c

index 3dc81397d0038495a4a9a11925990a42fedf46ce..9363e37b88709b563fae7a422c011a31264ccb94 100644 (file)
@@ -831,7 +831,7 @@ struct symbol *sym_lookup(const char *name, int flags)
        memset(symbol, 0, sizeof(*symbol));
        symbol->name = new_name;
        symbol->type = S_UNKNOWN;
-       symbol->flags |= flags;
+       symbol->flags = flags;
 
        symbol->next = symbol_hash[hash];
        symbol_hash[hash] = symbol;