From e658982624bfd5cd998066fdf35b93cdcf8797ca Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Tue, 13 Dec 2016 19:55:39 +0100 Subject: [PATCH] config: Fix bitwise copy-and-pasto for command line items. The recent change allowing every configuration option to appear on the command line wrongly used bitwise AND to set a flag. This patch fixes the bug by using the proper bitwise OR idiom. Signed-off-by: Richard Cochran Reported-by: Miroslav Lichvar Fixes: 4e8dbd8 ("ptp4l: Accept any configuration option as a command line argument.") --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.c b/config.c index 384b437..b19f3ad 100644 --- a/config.c +++ b/config.c @@ -418,7 +418,7 @@ static enum parser_result parse_item(struct config *cfg, } if (commandline) { - dst->flags &= CFG_ITEM_LOCKED; + dst->flags |= CFG_ITEM_LOCKED; } return PARSED_OK; }