Skip to content

Commit

Permalink
config: Fix bitwise copy-and-pasto for command line items.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reported-by: Miroslav Lichvar <[email protected]>
Fixes: 4e8dbd8 ("ptp4l: Accept any configuration option as a command line argument.")
  • Loading branch information
Richard Cochran committed Dec 13, 2016
1 parent 81d9765 commit e658982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e658982

Please sign in to comment.