summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2015-06-29 14:45:45 +0200
committerPeter Rajnoha <prajnoha@redhat.com>2015-06-29 14:45:53 +0200
commit158723608911fae1f18df5ea3c506434b521b5b5 (patch)
tree678a78979c54d60f544b56e897466045f13b4516
parent125cd06698bc1c52b812faa1686988b92cc2e192 (diff)
downloadlvm2-158723608911fae1f18df5ea3c506434b521b5b5.tar.gz
toolcontext: use proper set of chars to check time format against
-rw-r--r--lib/commands/toolcontext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 0d243f27f..09c14a34d 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -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))