master - toolcontext: use proper set of chars to check time format against
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=158723608911fae1f18df5ea3c506434b521b5b5 Commit: 158723608911fae1f18df5ea3c506434b521b5b5 Parent: 125cd06698bc1c52b812faa1686988b92cc2e192 Author: Peter Rajnoha <[email protected]> AuthorDate: Mon Jun 29 14:45:45 2015 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Mon Jun 29 14:45:53 2015 +0200
toolcontext: use proper set of chars to check time format against
--- lib/commands/toolcontext.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
lib/commands/toolcontext.c +2 -2
@@ -443,10 +443,10 @@ static const char *_set_time_format(struct cmd_context *cmd) chars_to_check = allowed_format_chars;for (i =0 ; chars_to_check[i]; i++) { -if (c == allowed_format_chars[i]) +if (c == chars_to_check[i])break ; } -if (!allowed_format_chars[i]) +if (!chars_to_check[i]) goto_bad; }else if (isprint (c))